oar

Observable Array

npm install oar
2 downloads in the last week
5 downloads in the last month

Oar (observable/evented array)

Small module that overwrites all the mutatable array methods and fires the related event.

Mutable array methods in Javascript

Example

var a = oar();

or

var a = oar(['one', 'two']);
a.push('three');

a.on('push', function (updated_array) {
  console.log(update_array); // ['one', 'two', 'three'];
});

Tests

mocha specs.js -R should
npm loves you