How can I call Function.prototype.bind with an array of arguments, as opposed to hardcoded arguments? (Not using ECMA6, so no spread operator).
I\'m trying to put a
For those using ES6, Babel compiles:
db.find.bind(this, ...arguments)
to:
db.find.bind.apply(db.find, [this].concat(Array.prototype.slice.call(arguments)));
I think it's fair to say Babel is pretty definitive. Credit to @lorenz-lo-sauer though, it's almost identical.