arqex / freezer

A tree data structure that emits events on updates, even if the modification is triggered by one of the leaves, making it easier to think in a reactive way.
MIT License
1.28k stars 56 forks source link

Make Freezer extendable (closes #22) #25

Closed kuraga closed 9 years ago

arqex commented 9 years ago

Hi @kuraga

I have been playing a bit to see what's the better way of making freezer extendable and it was way easier than what we thought! The key part was the commit you made with

Freezer.prototype.constructor = Freezer;

Just only with that line, Freezer becomes extendable. All the rest is not needed. See

http://bit.ly/1Et6L14

marquex commented 9 years ago

I didn't try with Freezer itself, but if the method sayHi works in the example, get and set should work in freezer. Don't they?

kuraga commented 9 years ago

Hell, you're completely right...

kuraga commented 9 years ago

See #26