$ npm install fast-apply
Apply an array of arguments... faster.
var fastApply = require('fast-apply')
, scope = {}
;
function run() {}
fastApply(run, scope, [ 'a', 'b', 'c' ]);
$ npm install fast-apply
none
It uses a simple switch statement to call the function rather than apply for up to 5 arguments.
While more than 5 arguments would run faster using apply, anything less will be
up to twice as fast
If the scope is null, fastApply will run up to 3 times faster than apply
apply© 2010 - cnpmjs.org x YWFE | Home | YWFE