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

"Example of use" sample output differs from expected output in comments #46

Closed christianvogt closed 8 years ago

christianvogt commented 8 years ago

The following code actually outputs "undefined" "false". The length of updatedB is actually 4.

console.log( updatedB[4] ); // logs 100
console.log(updatedB.length === 5); // true: We added 2 elements and removed 1

Looks to me like the sample and comments are incorrect because only one new element was added and not 2.

arqex commented 8 years ago

Well spotted. I will update the readme file in the next version :)

Thanks @zenfe