Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Data collection with a change event.
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
index.js
package.json
spec.js

README.md

Arrr

Data collection for objects with a change event when stuff gets pushed to it.

var arrr = require('arrr');

// First param of arrr is the base array for storing the data. 
// Second param is the id to find, remove, update objects.

var collection = arrr([], 'id');

collection.add({ id: '1234', name: 'foo' }); // id is unique objects with the same id wont be added
collection.find('1234');
collection.all();
collection.update({ id: '1234', name: 'bar' }); // will insert if id isn't found
collection.remove('1234');
collection.clear(); // remove everything
Something went wrong with that request. Please try again.