Add doc note to _.bind, _.bindAll, _.partial, _.partialRight, and _.curry about not setting the resulting functions .length. [closes #444]

This commit is contained in:
John-David Dalton
2014-01-09 08:24:23 -08:00
parent 8ade41b270
commit f99668f551
2 changed files with 105 additions and 82 deletions

View File

@@ -4535,6 +4535,9 @@
* binding of `thisArg` and prepends any additional `bind` arguments to those
* provided to the bound function.
*
* Note: Unlike native `Function#bind` this method does not set the `length`
* property of bound functions.
*
* @static
* @memberOf _
* @category Functions
@@ -4564,6 +4567,8 @@
* of method names. If no method names are provided all the function properties
* of `object` will be bound.
*
* Note: This method does not set the `length` property of bound functions.
*
* @static
* @memberOf _
* @category Functions
@@ -4692,6 +4697,8 @@
* remaining `func` arguments, and so on. The arity of `func` can be specified
* if `func.length` is not sufficient.
*
* Note: This method does not set the `length` property of curried functions.
*
* @static
* @memberOf _
* @category Functions
@@ -5000,6 +5007,9 @@
* `partial` arguments prepended to those provided to the new function. This
* method is similar to `_.bind` except it does **not** alter the `this` binding.
*
* Note: This method does not set the `length` property of partially applied
* functions.
*
* @static
* @memberOf _
* @category Functions
@@ -5021,6 +5031,9 @@
* This method is like `_.partial` except that `partial` arguments are
* appended to those provided to the new function.
*
* Note: This method does not set the `length` property of partially applied
* functions.
*
* @static
* @memberOf _
* @category Functions
@@ -5873,8 +5886,8 @@
/**
* Checks if `value` is, or can be coerced to, a finite number.
*
* Note: This is not the same as native `isFinite` which will return true for
* booleans and empty strings. See the [ES5 spec](http://es5.github.io/#x15.1.2.5)
* Note: This method is not the same as native `isFinite` which will return
* `true` for booleans and empty strings. See the [ES5 spec](http://es5.github.io/#x15.1.2.5)
* for more details.
*
* @static
@@ -5957,8 +5970,8 @@
/**
* Checks if `value` is `NaN`.
*
* Note: This is not the same as native `isNaN` which will return `true` for
* `undefined` and other non-numeric values. See the [ES5 spec](http://es5.github.io/#x15.1.2.4)
* Note: This method is not the same as native `isNaN` which will return `true`
* for `undefined` and other non-numeric values. See the [ES5 spec](http://es5.github.io/#x15.1.2.4)
* for more details.
*
* @static
@@ -6398,7 +6411,7 @@
}
/**
* An alternative to `_.reduce` this method transforms `object` to a new
* An alternative to `_.reduce`; this method transforms `object` to a new
* `accumulator` object which is the result of running each of its own
* enumerable properties through a callback, with each callback execution
* potentially mutating the `accumulator` object. The callback is bound to