Functionize
Turns an object into an object that can be called as a function.
Installation
This module is installed via npm:
$ npm install functionize --save
Or Bower:
$ bower install functionize --save
Example
var functionize = ;var object =counter: 1{return thiscounter += amt;};// The normal wayconsole; // 1console; // 10// The functionized wayobject = ;console; // 10console; // 19console; // 20 -- still works!
Pretty cool, eh? Take control of your objects!