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

Convert anonymous functions to arrow #12

Open
xjamundx opened this issue Jan 20, 2016 · 1 comment
Open

Convert anonymous functions to arrow #12

xjamundx opened this issue Jan 20, 2016 · 1 comment

Comments

@xjamundx
Copy link
Contributor

Anytime we have an anonymous function we can convert to an arrow function

hello(function () {

});

// becomes
hello(() => {

})
@nickmccurdy
Copy link

This would be cool, but careful about the differences in scope with this and arguments. It might be enough to only run this on functions that don't use either keyword, though if someone uses this you can't be 100% sure if they're using a this in another scope or if a scope is bound to the anonymous function.

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

No branches or pull requests

2 participants