Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

feat : add a filtered $on, allowing easy filtering and optimization#5

Merged
gregberge merged 3 commits intogregberge:masterfrom
Yvem:20150908-add_an_early_on_filtering_feature
Sep 10, 2015
Merged

feat : add a filtered $on, allowing easy filtering and optimization#5
gregberge merged 3 commits intogregberge:masterfrom
Yvem:20150908-add_an_early_on_filtering_feature

Conversation

@Yvem
Copy link
Copy Markdown
Contributor

@Yvem Yvem commented Sep 9, 2015

Factor a common filtering case when handling a primus event.

Bonus : apply() is not called if the event is filtered out, greatly helping heavy AngularJS apps.

Design note : add another function instead of extending $on, for readibility and to avoid complex arguments manipulation

Note : this PR adds a dependency to lodash

gregberge added a commit that referenced this pull request Sep 10, 2015
…ature

feat : add a filtered $on, allowing easy filtering and optimization
@gregberge gregberge merged commit db2d219 into gregberge:master Sep 10, 2015
@gregberge
Copy link
Copy Markdown
Owner

@Yvem readme needs some documentation, if you have time... Or I will do it later. Thanks for the PR.

@gregberge
Copy link
Copy Markdown
Owner

Released in 1.0.0.

@Yvem
Copy link
Copy Markdown
Contributor Author

Yvem commented Sep 10, 2015

@neoziro sorry for the missing doc

@Yvem Yvem mentioned this pull request Sep 10, 2015
@Yvem
Copy link
Copy Markdown
Contributor Author

Yvem commented Sep 10, 2015

@neoziro here it is #6

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants