-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs - Add helper-get-function-arity readme [skip ci] #6532
docs - Add helper-get-function-arity readme [skip ci] #6532
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/5451/ |
1 similar comment
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/5451/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Just slight changes are needed before merging
@@ -1,5 +1,19 @@ | |||
# @babel/helper-get-function-arity | |||
|
|||
Function that returns the number of arguments or operands that a function takes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im not sure what did u mean by operands here. Would be good to clarify it, but I think saying that it returns number of arguments is quite enough + clarification on what is considered to be an argument, for that we can just send readers to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. The operands part was taken from the wikipedia definition. Will make changes.
return false; | ||
} | ||
|
||
const argumentLength = getFunctionArity(method); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would call it argumentsLength
(plural)
Add to the README for helper-get-function-arity
[skip ci]