mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Bump to v3.7.0.
This commit is contained in:
@@ -33,7 +33,8 @@ define([], function() {
|
||||
return function() {
|
||||
if (--n > 0) {
|
||||
result = func.apply(this, arguments);
|
||||
} else {
|
||||
}
|
||||
if (n <= 1) {
|
||||
func = null;
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -12,7 +12,7 @@ define(['../internal/createWrapper', '../internal/replaceHolders', './restParam'
|
||||
* 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
|
||||
|
||||
@@ -9,7 +9,7 @@ define(['../internal/baseFlatten', '../internal/createWrapper', '../object/funct
|
||||
* 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 _
|
||||
|
||||
@@ -11,7 +11,7 @@ define(['../internal/createWrapper', '../internal/replaceHolders', './restParam'
|
||||
*
|
||||
* 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 @@ define(['../internal/createCurry'], function(createCurry) {
|
||||
* 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 @@ define(['../internal/createCurry'], function(createCurry) {
|
||||
* 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 @@ define(['./before'], function(before) {
|
||||
* // `initialize` invokes `createApplication` once
|
||||
*/
|
||||
function once(func) {
|
||||
return before(func, 2);
|
||||
return before(2, func);
|
||||
}
|
||||
|
||||
return once;
|
||||
|
||||
@@ -11,7 +11,7 @@ define(['../internal/createPartial'], function(createPartial) {
|
||||
* 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 @@ define(['../internal/createPartial'], function(createPartial) {
|
||||
* 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
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
define([], function() {
|
||||
|
||||
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||
var undefined;
|
||||
|
||||
/** Used as the `TypeError` message for "Functions" methods. */
|
||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||
|
||||
@@ -32,7 +35,7 @@ define([], function() {
|
||||
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