diff --git a/doc/README.md b/doc/README.md index cceeea61a..dc7238b57 100644 --- a/doc/README.md +++ b/doc/README.md @@ -145,7 +145,7 @@ The `lodash` function. ### `_.VERSION` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3103 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3105 "View in source") [Ⓣ][1] *(String)*: The semantic version number. @@ -264,7 +264,7 @@ jQuery('#lodash_button').on('click', buttonView.onClick); ### `_.chain(value)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3055 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3057 "View in source") [Ⓣ][1] Wraps the value in a `lodash` chainable object. @@ -527,7 +527,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]); ### `_.escape(string)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2751 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2753 "View in source") [Ⓣ][1] Escapes a string for insertion into HTML, replacing `&`, `<`, `"`, `'`, and `/` characters. @@ -818,7 +818,7 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); ### `_.identity(value)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2778 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2780 "View in source") [Ⓣ][1] This function returns the first argument passed to it. Note: It is used throughout Lo-Dash as a default callback. @@ -1555,7 +1555,7 @@ _.min([10, 5, 100, 2, 1000]); ### `_.mixin(object)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2804 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2806 "View in source") [Ⓣ][1] Adds functions properties of `object` to the `lodash` function and chainable wrapper. @@ -1585,7 +1585,7 @@ _('larry').capitalize(); ### `_.noConflict()` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2835 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2837 "View in source") [Ⓣ][1] Reverts the '_' variable to its previous value and returns a reference to the `lodash` function. @@ -1859,7 +1859,7 @@ _.rest([5, 4, 3, 2, 1]); ### `_.result(object, property)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2865 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2867 "View in source") [Ⓣ][1] Resolves the value of `property` on `object`. If the property is a function it will be invoked and its result returned, else the property value is returned. @@ -1918,15 +1918,15 @@ _.shuffle([1, 2, 3, 4, 5, 6]); ### `_.size(value)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2702 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2704 "View in source") [Ⓣ][1] -Gets the `length` of `value` when `value` is an array or string, or gets the number of enumerable own properties when `value` is an object. +Gets the size of a `value` by returning `value.length` if `value` is a string or array, or the number of own enumerable properties if `value` is an object. #### Arguments 1. `value` *(Array|Object|String)*: The value to inspect. #### Returns -*(Number)*: Returns the value's size. +*(Number)*: Returns `value.length` if `value` is a string or array, or the number of own enumerable properties if `value` is an object. #### Example ~~~ js @@ -2029,7 +2029,7 @@ _.sortedIndex([10, 20, 30, 40, 50], 35); ### `_.tap(value, interceptor)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2730 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2732 "View in source") [Ⓣ][1] Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The primary purpose of this method is to "tap into" a method chain, in order to performoperations on intermediate results within the chain. @@ -2059,7 +2059,7 @@ _.chain([1,2,3,200]) ### `_.template(text, data, options)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2925 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2927 "View in source") [Ⓣ][1] A JavaScript micro-templating method, similar to John Resig's implementation. Lo-Dash templating handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code. @@ -2144,7 +2144,7 @@ jQuery(window).on('scroll', throttled); ### `_.times(n, callback [, thisArg])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3002 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3004 "View in source") [Ⓣ][1] Executes the `callback` function `n` times. The `callback` is invoked with `1` argument; *(index)*. @@ -2240,7 +2240,7 @@ _.uniq([1, 2, 1, 3, 1, 4]); ### `_.uniqueId([prefix])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3025 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3027 "View in source") [Ⓣ][1] Generates a unique id. If `prefix` is passed, the id will be appended to it. @@ -2374,7 +2374,7 @@ _.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); ### `_.prototype.chain()` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3073 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3075 "View in source") [Ⓣ][1] Extracts the value from a wrapped chainable object. @@ -2395,7 +2395,7 @@ _([1, 2, 3]).value(); ### `_.prototype.value()` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3090 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3092 "View in source") [Ⓣ][1] Extracts the value from a wrapped chainable object. diff --git a/lodash.js b/lodash.js index bdfdc6039..780d55df9 100644 --- a/lodash.js +++ b/lodash.js @@ -2680,14 +2680,16 @@ } /** - * Gets the `length` of `value` when `value` is an array or string, or gets - * the number of enumerable own properties when `value` is an object. + * Gets the size of a `value` by returning `value.length` if `value` is a + * string or array, or the number of own enumerable properties if `value` is + * an object. * * @static * @memberOf _ * @category Objects * @param {Array|Object|String} value The value to inspect. - * @returns {Number} Returns the value's size. + * @returns {Number} Returns `value.length` if `value` is a string or array, + * or the number of own enumerable properties if `value` is an object. * @example * * _.size([1, 2]);