ryggrad-collection

0.0.2 • Public • Published

ryggrad-collection Build Status

A class for managing collections of objects. Supports all the underscore Collection methods and quacks like an Array. It is used as the basis for ryggrad-model

Installation and Usage

It is designed to be used through node or browserify; so npm is the only way to get it:

$ npm install ryggrad-collection --save

Then require it and add some stuff

Collection = require 'ryggrad-collection'
cats = new Collection()
cat = name: "Snow, Ballz"
collection.add(cat)

You can treat it much like you would an Array (it inherits from the Array object):

cat2 = name: "The Lord"
cats.push cat2
console.log cats[1] # => {name: "The Lord"}

etc...

See spec/spec.coffee for further usage examples.

Readme

Keywords

none

Package Sidebar

Install

npm i ryggrad-collection

Weekly Downloads

0

Version

0.0.2

License

none

Last publish

Collaborators

  • k2052