Skip to content
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

Alias restArgs as restParam #2212

Closed
wants to merge 1 commit into from
Closed

Conversation

megawac
Copy link
Collaborator

@megawac megawac commented Jun 12, 2015

Closes #2209

Related issue (where name was discussed) #2140

In the name of lodash/underdash compatibility I think we should probably drop restArgs in favour of restParam which is closer to what is described in the JavaScript spec (rest parameter). The counter argument is we call them args elsewhere in the library.

Otherwise an alias should be sufficient.

@megawac megawac mentioned this pull request Jun 12, 2015
6 tasks
@jdalton
Copy link
Contributor

jdalton commented Jun 12, 2015

The counter argument is we call them args elsewhere in the library.

Yep, except a rest parameter isn't plural it's a single param so args (plural) is incorrect no matter how you slice it. Also a function can accept several args but may only have 1 or 2 params. For example _.without from v1.7.0 has 1 param, array, but accepts multiple arguments to filter out.

@megawac megawac closed this Jul 14, 2015
@megawac megawac deleted the restParam branch July 14, 2015 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alias _.restArgs as _.restParam
2 participants