extend-context
like _.bind() and _.bindAll() but extends the context (this
) instead of replacing it
Usage:
var extendContext = ; var { console; } // someFunction();// $ undefined someFunction = ; // someFunction();// $ true
_.bindAll
)
To do an object of functions all at once (like var someObject = { ... } { ... } { ... };someObject = extendContextallsomeObject sails: ; // Now I can do:someObject;someObject;someObject; // And they'll all have access to `sails`.
License
MIT c. Mike McNeil 2014