mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Update docs, dist builds, and fix build.
Former-commit-id: 95a2ae15735b2c98f24c20b8dc894c2832ac107b
This commit is contained in:
71
dist/lodash.compat.js
vendored
71
dist/lodash.compat.js
vendored
@@ -578,7 +578,7 @@
|
||||
* `sortedIndex`, `runInContext`, `template`, `unescape`, `uniqueId`, and `value`
|
||||
*
|
||||
* The wrapper functions `first` and `last` return wrapped values when `n` is
|
||||
* passed, otherwise they return unwrapped values.
|
||||
* provided, otherwise they return unwrapped values.
|
||||
*
|
||||
* @name _
|
||||
* @constructor
|
||||
@@ -1386,14 +1386,14 @@
|
||||
|
||||
/**
|
||||
* Creates a function that, when called, invokes `func` with the `this` binding
|
||||
* of `thisArg` and prepends any `partialArgs` to the arguments passed to the
|
||||
* of `thisArg` and prepends any `partialArgs` to the arguments provided to the
|
||||
* bound function.
|
||||
*
|
||||
* @private
|
||||
* @param {Function|String} func The function to bind or the method name.
|
||||
* @param {Mixed} thisArg The `this` binding of `func`.
|
||||
* @param {Array} partialArgs An array of arguments to be prepended to those passed to the new function.
|
||||
* @param {Array} partialRightArgs An array of arguments to be appended to those passed to the new function.
|
||||
* @param {Array} partialArgs An array of arguments to be prepended to those provided to the new function.
|
||||
* @param {Array} partialRightArgs An array of arguments to be appended to those provided to the new function.
|
||||
* @param {Boolean} [isPartial=false] A flag to indicate performing only partial application.
|
||||
* @param {Boolean} [isAlt=false] A flag to indicate `_.bindKey` or `_.partialRight` behavior.
|
||||
* @returns {Function} Returns the new bound function.
|
||||
@@ -1932,7 +1932,7 @@
|
||||
|
||||
/**
|
||||
* This method is like `_.findIndex`, except that it returns the key of the
|
||||
* element that passes the callback check, instead of the element itself.
|
||||
* first element that passes the callback check, instead of the element itself.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -2996,7 +2996,7 @@
|
||||
* per iteration. If a property name or object is provided, it will be used
|
||||
* to create a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Boolean} Returns `true` if all elements pass the callback check,
|
||||
* @returns {Boolean} Returns `true` if all elements passed the callback check,
|
||||
* else `false`.
|
||||
* @example
|
||||
*
|
||||
@@ -3359,7 +3359,7 @@
|
||||
/**
|
||||
* Invokes the method named by `methodName` on each element in the `collection`,
|
||||
* returning an array of the results of each invoked method. Additional arguments
|
||||
* will be passed to each invoked method. If `methodName` is a function, it will
|
||||
* will be provided to each invoked method. If `methodName` is a function, it will
|
||||
* be invoked for, and `this` bound to, each element in the `collection`.
|
||||
*
|
||||
* @static
|
||||
@@ -3612,7 +3612,7 @@
|
||||
* Reduces a `collection` to a value which is the accumulated result of running
|
||||
* each element in the `collection` through the `callback`, where each successive
|
||||
* `callback` execution consumes the return value of the previous execution.
|
||||
* If `accumulator` is not passed, the first element of the `collection` will be
|
||||
* If `accumulator` is not provided, the first element of the `collection` will be
|
||||
* used as the initial `accumulator` value. The `callback` is bound to `thisArg`
|
||||
* and invoked with four arguments; (accumulator, value, index|key, collection).
|
||||
*
|
||||
@@ -3871,7 +3871,7 @@
|
||||
* per iteration. If a property name or object is provided, it will be used
|
||||
* to create a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Boolean} Returns `true` if any element passes the callback check,
|
||||
* @returns {Boolean} Returns `true` if any element passed the callback check,
|
||||
* else `false`.
|
||||
* @example
|
||||
*
|
||||
@@ -4050,8 +4050,8 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array excluding all values of the passed-in arrays using
|
||||
* strict equality for comparisons, i.e. `===`.
|
||||
* Creates an array excluding all values of the provided arrays using strict
|
||||
* equality for comparisons, i.e. `===`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -4095,7 +4095,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is like `_.find`, except that it returns the index of the
|
||||
* This method is like `_.find`, except that it returns the index of the first
|
||||
* element that passes the callback check, instead of the element itself.
|
||||
*
|
||||
* @static
|
||||
@@ -4403,7 +4403,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of unique values present in all passed-in arrays using
|
||||
* Creates an array of unique values present in all provided arrays using
|
||||
* strict equality for comparisons, i.e. `===`.
|
||||
*
|
||||
* @static
|
||||
@@ -4573,7 +4573,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all passed values from the given array using strict equality for
|
||||
* Removes all provided values from the given array using strict equality for
|
||||
* comparisons, i.e. `===`.
|
||||
*
|
||||
* @static
|
||||
@@ -4634,12 +4634,15 @@
|
||||
* _.range(0, -10, -1);
|
||||
* // => [0, -1, -2, -3, -4, -5, -6, -7, -8, -9]
|
||||
*
|
||||
* _.range(1, 4, 0);
|
||||
* // => [1, 1, 1]
|
||||
*
|
||||
* _.range(0);
|
||||
* // => []
|
||||
*/
|
||||
function range(start, end, step) {
|
||||
start = +start || 0;
|
||||
step = +step || 1;
|
||||
step = typeof step == 'number' ? step : 1;
|
||||
|
||||
if (end == null) {
|
||||
end = start;
|
||||
@@ -4648,7 +4651,7 @@
|
||||
// use `Array(length)` so engines, like Chakra and V8, avoid slower modes
|
||||
// http://youtu.be/XAqIpGU8ZZk#t=17m25s
|
||||
var index = -1,
|
||||
length = nativeMax(0, ceil((end - start) / step)),
|
||||
length = nativeMax(0, ceil((end - start) / (step || 1))),
|
||||
result = Array(length);
|
||||
|
||||
while (++index < length) {
|
||||
@@ -4798,8 +4801,8 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of unique values, in order, of the passed-in arrays
|
||||
* using strict equality for comparisons, i.e. `===`.
|
||||
* Creates an array of unique values, in order, of the provided arrays using
|
||||
* strict equality for comparisons, i.e. `===`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -4873,7 +4876,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array excluding all passed values using strict equality for
|
||||
* Creates an array excluding all provided values using strict equality for
|
||||
* comparisons, i.e. `===`.
|
||||
*
|
||||
* @static
|
||||
@@ -4985,7 +4988,7 @@
|
||||
/**
|
||||
* Creates a function that, when called, invokes `func` with the `this`
|
||||
* binding of `thisArg` and prepends any additional `bind` arguments to those
|
||||
* passed to the bound function.
|
||||
* provided to the bound function.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -5046,7 +5049,7 @@
|
||||
|
||||
/**
|
||||
* Creates a function that, when called, invokes the method at `object[key]`
|
||||
* and prepends any additional `bindKey` arguments to those passed to the bound
|
||||
* and prepends any additional `bindKey` arguments to those provided to the bound
|
||||
* function. This method differs from `_.bind` by allowing bound functions to
|
||||
* reference methods that will be redefined or don't yet exist.
|
||||
* See http://michaux.ca/articles/lazy-function-definition-pattern.
|
||||
@@ -5083,7 +5086,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that is the composition of the passed functions,
|
||||
* Creates a function that is the composition of the provided functions,
|
||||
* where each function consumes the return value of the function that follows.
|
||||
* For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`.
|
||||
* Each function is executed with the `this` binding of the composed function.
|
||||
@@ -5316,7 +5319,7 @@
|
||||
|
||||
/**
|
||||
* Defers executing the `func` function until the current call stack has cleared.
|
||||
* Additional arguments will be passed to `func` when it is invoked.
|
||||
* Additional arguments will be provided to `func` when it is invoked.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -5340,7 +5343,7 @@
|
||||
|
||||
/**
|
||||
* Executes the `func` function after `wait` milliseconds. Additional arguments
|
||||
* will be passed to `func` when it is invoked.
|
||||
* will be provided to `func` when it is invoked.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -5362,11 +5365,11 @@
|
||||
|
||||
/**
|
||||
* Creates a function that memoizes the result of `func`. If `resolver` is
|
||||
* passed, it will be used to determine the cache key for storing the result
|
||||
* based on the arguments passed to the memoized function. By default, the first
|
||||
* argument passed to the memoized function is used as the cache key. The `func`
|
||||
* is executed with the `this` binding of the memoized function. The result
|
||||
* cache is exposed as the `cache` property on the memoized function.
|
||||
* provided, it will be used to determine the cache key for storing the result
|
||||
* based on the arguments provided to the memoized function. By default, the
|
||||
* first argument provided to the memoized function is used as the cache key.
|
||||
* The `func` is executed with the `this` binding of the memoized function.
|
||||
* The result cache is exposed as the `cache` property on the memoized function.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -5429,7 +5432,7 @@
|
||||
|
||||
/**
|
||||
* Creates a function that, when called, invokes `func` with any additional
|
||||
* `partial` arguments prepended to those passed to the new function. This
|
||||
* `partial` arguments prepended to those provided to the new function. This
|
||||
* method is similar to `_.bind`, except it does **not** alter the `this` binding.
|
||||
*
|
||||
* @static
|
||||
@@ -5451,7 +5454,7 @@
|
||||
|
||||
/**
|
||||
* This method is like `_.partial`, except that `partial` arguments are
|
||||
* appended to those passed to the new function.
|
||||
* appended to those provided to the new function.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -5533,8 +5536,8 @@
|
||||
|
||||
/**
|
||||
* Creates a function that passes `value` to the `wrapper` function as its
|
||||
* first argument. Additional arguments passed to the function are appended
|
||||
* to those passed to the `wrapper` function. The `wrapper` is executed with
|
||||
* first argument. Additional arguments provided to the function are appended
|
||||
* to those provided to the `wrapper` function. The `wrapper` is executed with
|
||||
* the `this` binding of the created function.
|
||||
*
|
||||
* @static
|
||||
@@ -5581,7 +5584,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the first argument passed to it.
|
||||
* This method returns the first argument provided to it.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
|
||||
Reference in New Issue
Block a user