From 676e1705c12f97770686f8e72939e68d48727ddd Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 16 Dec 2013 02:34:46 -0800 Subject: [PATCH] Rebuild docs and dist. --- dist/lodash.underscore.js | 11 ++++++----- doc/README.md | 21 +++++++++++---------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/dist/lodash.underscore.js b/dist/lodash.underscore.js index c3fec2a4b..8379d07e0 100644 --- a/dist/lodash.underscore.js +++ b/dist/lodash.underscore.js @@ -2643,7 +2643,7 @@ * @param {number} [n] The number of elements to sample. * @param- {Object} [guard] Allows working with functions like `_.map` * without using their `index` arguments as `n`. - * @returns {Array} Returns the random sample(s) of `collection`. + * @returns {*} Returns the random sample(s) of `collection`. * @example * * _.sample([1, 2, 3, 4]); @@ -4763,16 +4763,17 @@ } /** - * Invokes `interceptor` with the `value` as the first argument and then - * returns `value`. The purpose of this method is to "tap into" a method - * chain in order to perform operations on intermediate results within - * the chain. + * This method invokes `interceptor` and returns `value`. The interceptor is + * bound to `thisArg` and invoked with one argument; (value). The purpose of + * this method is to "tap into" a method chain in order to perform operations + * on intermediate results within the chain. * * @static * @memberOf _ * @category Chaining * @param {*} value The value to provide to `interceptor`. * @param {Function} interceptor The function to invoke. + * @param {*} [thisArg] The `this` binding of `interceptor`. * @returns {*} Returns `value`. * @example * diff --git a/doc/README.md b/doc/README.md index c82604659..008f6e05c 100644 --- a/doc/README.md +++ b/doc/README.md @@ -44,7 +44,7 @@ ## `Chaining` * `_` * `_.chain` -* `_.tap` +* `_.tap` * `_.prototype.chain` * `_.prototype.toString` * `_.prototype.value` -> `valueOf` @@ -1173,14 +1173,15 @@ var youngest = _.chain(characters) -### `_.tap(value, interceptor)` -# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6864 "View in source") [Ⓣ][1] +### `_.tap(value, interceptor, [thisArg])` +# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6865 "View in source") [Ⓣ][1] -Invokes `interceptor` with the `value` as the first argument and then returns `value`. The purpose of this method is to "tap into" a method chain in order to perform operations on intermediate results within the chain. +This method invokes `interceptor` and returns `value`. The interceptor is bound to `thisArg` and invoked with one argument; *(value)*. The purpose of this method is to "tap into" a method chain in order to perform operations on intermediate results within the chain. #### Arguments 1. `value` *(*)*: The value to provide to `interceptor`. 2. `interceptor` *(Function)*: The function to invoke. +3. `[thisArg]` *(*)*: The `this` binding of `interceptor`. #### Returns *(*)*: Returns `value`. @@ -1202,7 +1203,7 @@ _([1, 2, 3, 4]) ### `_.prototype.chain()` -# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6894 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6895 "View in source") [Ⓣ][1] Enables explicit method chaining on the wrapper object. @@ -1236,7 +1237,7 @@ _(characters).chain() ### `_.prototype.toString()` -# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6911 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6912 "View in source") [Ⓣ][1] Produces the `toString` result of the wrapped value. @@ -1257,7 +1258,7 @@ _([1, 2, 3]).toString(); ### `_.prototype.valueOf()` -# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6928 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L6929 "View in source") [Ⓣ][1] Extracts the wrapped value. @@ -2009,7 +2010,7 @@ Retrieves a random element or `n` random elements from a collection. 2. `[n]` *(number)*: The number of elements to sample. #### Returns -*(Array)*: Returns the random sample(s) of `collection`. +*(*)*: Returns the random sample(s) of `collection`. #### Example ```js @@ -3783,7 +3784,7 @@ If an object is provided for `callback` the created "_.where" style callback wil 3. `[thisArg]` *(*)*: The `this` binding of `callback`. #### Returns -*(Array)*: Returns a new object with values of the results of each `callback` execution. +*(Object)*: Returns a new object with values of the results of each `callback` execution. #### Example ```js @@ -4580,7 +4581,7 @@ A reference to the `lodash` function. ### `_.VERSION` -# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7128 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/master/lodash.js#L7129 "View in source") [Ⓣ][1] *(string)*: The semantic version number.