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

Require node 6; use more ES6 features #4752

Merged
merged 3 commits into from
May 25, 2017
Merged

Require node 6; use more ES6 features #4752

merged 3 commits into from
May 25, 2017

Conversation

jfirebaugh
Copy link
Contributor

Require node 6, allowing us to permit use of additional ES6 features:

  • default parameters
  • rest parameters
  • destructuring

Copy link
Contributor

@anandthakker anandthakker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

I'm still not a fan of destructuring, but it's in the language so what can I do 🤷‍♂️

@jfirebaugh
Copy link
Contributor Author

jfirebaugh commented May 25, 2017

Reverted the changes to default parameters; they turned out to be too dangerous in existing code, which may be receiving falsy values like null, 0, or '' rather than undefined. We can start using them in new code.

@jfirebaugh jfirebaugh merged commit 010f425 into master May 25, 2017
@jfirebaugh jfirebaugh deleted the node-6 branch May 25, 2017 18:01
const evaluatedUpper = outputUpper.apply(undefined, arguments);
return function(...args) {
const evaluatedLower = outputLower.apply(undefined, args);
const evaluatedUpper = outputUpper.apply(undefined, args);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can do outputLower(...args).

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.

3 participants