0.1.0 • Published 11 years ago

get-set v0.1.0

Weekly downloads
3
License
-
Repository
github
Last release
11 years ago

#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