co-wrapper
Wrap each function in object with a thunk. Useful for generator-based flow control such as co.
How to use it
var EventEmitter = EventEmitter inherits = inherits; var TestClass = module { EventEmitter; // define some properties this_foo = 'foo'; this_bar = 'bar'; Object; Object;};; // define async functionTestClassprototype { ;}; // define sync functionTestClassprototype { return thisfoo + thisbar;}; // wrap oroginal object with co-wrappervar wrap = ;var wrapper = wrapper = ; { console;};
Options
exclude: // object functions, that should be excluded methods: // list of methods to wrap isEventEmitter: true // set to true, if object has event emitter functionality properties: name: {return this_foo} // getters and setters can be String, // that defines source object property, or function set: '_foo' // function would be run in source object scope // other Object.defineProperty parameters
License: MIT