AmpFire-Model
A modified, CommonJS version of Firebase's BackboneFire for AmpersandJS Models.
Installation
npm install ampfire-model
If you want it automatically added to your project's package.json use:
npm install ampfire-model --save
Basic Usage
First you should require the module.
var AmpfireModel = ;
Next simply extend the AmpfireModel passing it the firebase url
var RealtimeModel = AmpfireModel; // Instantiate the model var realtimeModel = ; realtimeModel;
The rest of the API is the same as that of BackboneFire
Dependencies
- ampersand-model
- lodash functions
- extend: lodash.object
- keys: lodash.object
- defaults: lodash.object
- result: lodash.object
- isObject: lodash.lang
- isFunction: lodash.lang
- difference: lodash/array/difference
- bind: lodash/function/bind
- each: lodash/collection/eac
Tests
Coming soon...
Demo
Coming soon...
Credits
This is all just a modification of the amazing work the Firebase team did on BackboneFire. It uses the awesome AmpersandJS Framework from the guys over at &yet.
Licence
MIT