medikoo / medikoo/observable-set
Simplify events handling
Open
@medikoo is already working on this.
Since Jan 15, 2016.
- Dominant language
- JavaScript
- Stars
- 5
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Let's replace current events system with three kind of events:
add- when new element is added (separate event per element)delete- when element is deleted (separate event per element)change- whenever some change occurred in set.- It can be called once per many simultaneous changes, e.g. once per 2 adds and 3 deletes if they where done one after another.
- It also can be called when in summary no elements where added and deleted, but ordering of elements in set have changed (e.g. when having { 1, 3 } set, we do
set.clear(); set.add(3); set.add(1);. noadd, anddeleteevents will be invoked, howeverchangeevent will occur. - It should also be allowed (for performance reasons) to emit
changewhen change not necessarily may have occurred (and compute of whether it indeed occurred is expensive). - This event doesn't suppress
addanddelete, it's supplementary to first two
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.