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

Show how to handle sloppy var hoisting/side-effects #9

Open
justsml opened this issue May 11, 2017 · 0 comments
Open

Show how to handle sloppy var hoisting/side-effects #9

justsml opened this issue May 11, 2017 · 0 comments
Labels

Comments

@justsml
Copy link
Owner

justsml commented May 11, 2017

Demonstrate a few ways to use closures for sharing variables over boundaries.

Don't write code like this - ok if you cant re-order function calls, or a use a context-free wrapper function. I sometimes fallback to this technique if I have a legacy API, or other design challenge (e.g. EventEmitter with several paths for success & errors).

@justsml justsml added the task label May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant