get-set
v0.1.0
Published
Set, get, on, trigger. My basic model toolkit.
Downloads
8
Readme
#getSet
For small projects that don't necessitate a framework solution, I often want to reach into the backbone.js toolkit. getSet provides that minimal kit: events (on, trigger), get, and set.
##Usage
//Define your constructor
var MyModel = function() {};
MyModel.prototpe = new GetSet();
//Now define the rest of your model...
MyModel.prototype...
##API
on(name, fn)
trigger(name, arg1, arg2 /* , ... */)
get(key)
set(key,val);
set(object); //Object of key-val pairs