Add apply doc block. [ci skip]

This commit is contained in:
John-David Dalton
2015-11-10 23:34:20 -08:00
parent 5551a8365a
commit 55383b9de4

View File

@@ -371,6 +371,16 @@
return set;
}
/**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
* @param {...*} [args] The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
switch(args.length) {
case 0: return func.call(thisArg);