mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +00:00
Bump to v3.7.0.
This commit is contained in:
@@ -31,7 +31,8 @@ function before(n, func) {
|
||||
return function() {
|
||||
if (--n > 0) {
|
||||
result = func.apply(this, arguments);
|
||||
} else {
|
||||
}
|
||||
if (n <= 1) {
|
||||
func = null;
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -14,7 +14,7 @@ var BIND_FLAG = 1,
|
||||
* The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
|
||||
* may be used as a placeholder for partially applied arguments.
|
||||
*
|
||||
* **Note:** Unlike native `Function#bind` this method does not set the `length`
|
||||
* **Note:** Unlike native `Function#bind` this method does not set the "length"
|
||||
* property of bound functions.
|
||||
*
|
||||
* @static
|
||||
|
||||
@@ -12,7 +12,7 @@ var BIND_FLAG = 1;
|
||||
* of method names. If no method names are provided all enumerable function
|
||||
* properties, own and inherited, of `object` are bound.
|
||||
*
|
||||
* **Note:** This method does not set the `length` property of bound functions.
|
||||
* **Note:** This method does not set the "length" property of bound functions.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
|
||||
@@ -13,7 +13,7 @@ var BIND_FLAG = 1,
|
||||
*
|
||||
* This method differs from `_.bind` by allowing bound functions to reference
|
||||
* methods that may be redefined or don't yet exist.
|
||||
* See [Peter Michaux's article](http://michaux.ca/articles/lazy-function-definition-pattern)
|
||||
* See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
|
||||
* for more details.
|
||||
*
|
||||
* The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
|
||||
|
||||
@@ -13,7 +13,7 @@ var CURRY_FLAG = 8;
|
||||
* The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
|
||||
* may be used as a placeholder for provided arguments.
|
||||
*
|
||||
* **Note:** This method does not set the `length` property of curried functions.
|
||||
* **Note:** This method does not set the "length" property of curried functions.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
|
||||
@@ -10,7 +10,7 @@ var CURRY_RIGHT_FLAG = 16;
|
||||
* The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
|
||||
* builds, may be used as a placeholder for provided arguments.
|
||||
*
|
||||
* **Note:** This method does not set the `length` property of curried functions.
|
||||
* **Note:** This method does not set the "length" property of curried functions.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
|
||||
@@ -18,7 +18,7 @@ import before from './before';
|
||||
* // `initialize` invokes `createApplication` once
|
||||
*/
|
||||
function once(func) {
|
||||
return before(func, 2);
|
||||
return before(2, func);
|
||||
}
|
||||
|
||||
export default once;
|
||||
|
||||
@@ -11,7 +11,7 @@ var PARTIAL_FLAG = 32;
|
||||
* The `_.partial.placeholder` value, which defaults to `_` in monolithic
|
||||
* builds, may be used as a placeholder for partially applied arguments.
|
||||
*
|
||||
* **Note:** This method does not set the `length` property of partially
|
||||
* **Note:** This method does not set the "length" property of partially
|
||||
* applied functions.
|
||||
*
|
||||
* @static
|
||||
|
||||
@@ -10,7 +10,7 @@ var PARTIAL_RIGHT_FLAG = 64;
|
||||
* The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
|
||||
* builds, may be used as a placeholder for partially applied arguments.
|
||||
*
|
||||
* **Note:** This method does not set the `length` property of partially
|
||||
* **Note:** This method does not set the "length" property of partially
|
||||
* applied functions.
|
||||
*
|
||||
* @static
|
||||
|
||||
@@ -30,7 +30,7 @@ function restParam(func, start) {
|
||||
if (typeof func != 'function') {
|
||||
throw new TypeError(FUNC_ERROR_TEXT);
|
||||
}
|
||||
start = nativeMax(typeof start == 'undefined' ? (func.length - 1) : (+start || 0), 0);
|
||||
start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
|
||||
return function() {
|
||||
var args = arguments,
|
||||
index = -1,
|
||||
|
||||
Reference in New Issue
Block a user