mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Add apply doc block. [ci skip]
This commit is contained in:
10
lodash.js
10
lodash.js
@@ -371,6 +371,16 @@
|
|||||||
return set;
|
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) {
|
function apply(func, thisArg, args) {
|
||||||
switch(args.length) {
|
switch(args.length) {
|
||||||
case 0: return func.call(thisArg);
|
case 0: return func.call(thisArg);
|
||||||
|
|||||||
Reference in New Issue
Block a user