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

Typo in "Update methods"? #15

Closed ArnoBuschmann closed 9 years ago

ArnoBuschmann commented 9 years ago

In the Readme.md file we have under: https://github.com/arqex/freezer#update-methods

var store = new Freezer({obj: {a:'hola', b:'adios'}, arr: [1,2]});
var updatedObj = store.get().obj.update('a', 'hello');
console.log( updatedObj ); // {a:'hello', b:'adios'}

Which seems to throw an 'undefined' error because there is no method called update. I guess you meant to write just 'set' instead of 'update' like this:

var store = new Freezer({obj: {a:'hola', b:'adios'}, arr: [1,2]});
var updatedObj = store.get().obj.set('a', 'hello');
console.log( updatedObj ); // {a:'hello', b:'adios'}

?

arqex commented 9 years ago

@ArnoBuschmann thanks!