asimov-collection
v0.1.3
Published
Collection and model classes for asimov.js
Downloads
2
Readme
asimov-collection
Collection and model classes for asimov.js
How to use
Install from NPM
$ npm install asimov-collection
Model and Collection
The Model and Collection classes are modified versions of Backbone's RESTful model and collection implementations, please check out their docs to learn the basics.
FileModel
The FileModel's fetch()
method will read attributes.path
, set the file contents as attributes.raw
and call parseRaw (string raw)
.
FileCollection
The fetch (string path)
method will crawl the entire tree, calling shouldReadPath()
before reading in each model, giving a chance to opt out from creating certain models.
Made by Adam Renklint, Berlin 2014. MIT licensed.