Nifty Procrastination Machine
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    oarpublic

    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

    Keywords

    none

    install

    npm i oar

    Downloadsweekly downloads

    4

    version

    1.0.0

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar