hr.collection
Data modelling utility
Installation
$ npm install hr.collection
Documentation
Creation
Create a new collection by extending the default Collection
:
var Collection = ; var Posts = Collection;
Collection instance
var posts = ;
Add and remove models
var post = ; // Append the postposts; // Remove the postposts;
Events
// When a new model is addedposts; // When a model is removedposts; // When the collection is resetposts;
Example with React
var React = ;var Collection = ; var Users = Collection; var UserItem = React; var UsersList= React;