Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Reactor.prototype.hello and send: same args, different order #331

Closed
rwaldron opened this Issue Sep 10, 2012 · 3 comments

Comments

Projects
None yet
3 participants
Contributor

rwaldron commented Sep 10, 2012

Oh noes!

This might not even be an issue, if the Reactor is only used internally :)

Owner

sindresorhus commented Sep 10, 2012

Only used internally, and it will be completely redone in the next version with integration of LiveReload #182.

Contributor

rwaldron commented Sep 10, 2012

Sort of related: is the intention to have that ws closed over in this scope for privacy? If so, I would totally suggest using a WeakMap (I'm using https://github.com/WebReflection/es6-collections for now as a polyfill). This way you can omit the ws as an argument to the hello and send methods, while still "binding" them to this instance :D

Owner

sindresorhus commented Sep 10, 2012

No idea, @mklabs did that module.

But yeah, it's nice to see some use cases of WeakMap.

@addyosmani addyosmani added a commit that referenced this issue Sep 11, 2012

@addyosmani addyosmani Merge pull request #336 from rwldrn/331
Use WeakMap to maintain WS object to instance binding. Fixes #331
9d984d0

@szinya szinya pushed a commit to menthainternet/yeoman that referenced this issue Sep 17, 2014

@rwaldron rwaldron Use WeakMap to maintain WS object to instance binding. Fixes #331 6e51afe

@szinya szinya pushed a commit to menthainternet/yeoman that referenced this issue Sep 17, 2014

@addyosmani addyosmani Merge pull request #336 from rwldrn/331
Use WeakMap to maintain WS object to instance binding. Fixes #331
2d217c2

@addyosmani addyosmani added a commit that referenced this issue Apr 24, 2015

@addyosmani addyosmani Merge pull request #336 from rwldrn/331
Use WeakMap to maintain WS object to instance binding. Fixes #331
cb55f1f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment