question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tl;dr: checks that arguments.length doesn’t exceed a certain limit

inspired by: https://www.eventbrite.com/engineering/learning-es6-rest-spread-operators/#enforcing-maximum-arity

I don’t have a proposal yet.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Mouvediacommented, Jun 28, 2016

I think this is not warranted at this stage and would introduce uncalled complexity. max-params will do the job just fine.

0reactions
jokeyrhymecommented, May 15, 2016

Might be better to define a tuple interface with a name first, then use that name in the function signature. Doing it inline seems convenient but looks like it would get hard to read.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Arity - Wikipedia
Arity is the number of arguments or operands taken by a function, operation or relation in logic, mathematics, and computer science. In mathematics,...
Read more >
Function arity - Medium
We can define the minimum arity as the smallest number of arguments function expects and the maximum arity as the largest number of...
Read more >
Arity & Default Values - CommandDotNet
Arity describes how many values a user can or must provide for an argument. ArgumentArity is expressed as a minimum and maximum value....
Read more >
Arity (MIT/GNU Scheme 11.2)
Returns an arity object made from min and max . Min must be an exact non-negative integer. Max must be an exact non-negative...
Read more >
arity - Wiktionary
NounEdit · (logic, mathematics, computer science) The number of arguments or operands a function or operation takes. · (mathematics, computer science) The maximum...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found