Sha256: 25914e1bd1ef19685d4463295b895aef792a68f707b7b7edc1c98e2c45d6c864
Contents?: true
Size: 653 Bytes
Versions: 69
Compression:
Stored size: 653 Bytes
Contents
define(['../array/slice'], function(slice){ /** * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. * @param {Function} fn Function. * @param {object} context Execution context. * @param {rest} args Arguments (0...n arguments). * @return {Function} Wrapped Function. */ function bind(fn, context, args){ var argsArr = slice(arguments, 2); //curried args return function(){ return fn.apply(context, argsArr.concat(slice(arguments))); }; } return bind; });
Version data entries
69 entries across 69 versions & 2 rubygems