googlearchive / observe-js

A library for observing Arrays, Objects and PathValues
1.35k stars 116 forks source link

Add array contents observer #83

Open brianchin opened 9 years ago

brianchin commented 9 years ago

This new type of observer constructs observers for each element of the array, even as the elements of the array changes. It reports changes to the array itself similar to ArrayObserver, and reports changes to the elements as sent by the user-created element observer type.

jmesserly commented 9 years ago

My usual thought here is if it's worth adding to observe.js, vs another repository/file? Certainly not opposed to having it here, if it's going to be widely used. There was a push at one point to drive observe.js to a small size, because folks are generally very sensitive about code size. Another option is to start building up another .js file with utilities, and folks can include that in their page/build if desired. (A similar question arose around a "DeepObjectObserver" recently.)

addyosmani commented 9 years ago

My two cents are that this type of functionality is best served via additional repositories which we link to or in a utils file/directory. That way we avoid the size of the shim growing with what some may consider optionally useful helpers.

tilgovi commented 9 years ago

:+1: @addyosmani