0.6.0 • Published 10 years ago
bind-right v0.6.0
bind-right
JavaScript: bind arguments from the right.
Installation
npm install bind-right
Usage
require('bind-right'); // extends the function prototype
function createArray (/* items */) {
return [].concat(arguments);
};
var thisArg = null;
var bound = createArray.bindRight(thisArg, 3,4,5);
var array = bound(1,2,3);
// array: [1, 2, 3, 4, 5, 6];
OMG IT EXTENDS FUNCTION???!?!@
Yes, as it should.
License
MIT