From 55383b9de4d0594aa46e552c00aca1a5c80fc457 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 10 Nov 2015 23:34:20 -0800 Subject: [PATCH] Add `apply` doc block. [ci skip] --- lodash.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lodash.js b/lodash.js index 7450870e9..f2a608463 100644 --- a/lodash.js +++ b/lodash.js @@ -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);