mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Comment cleanup. [ci skip]
This commit is contained in:
54
lodash.js
54
lodash.js
@@ -1232,8 +1232,8 @@
|
|||||||
}(0, 0));
|
}(0, 0));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* By default, the template delimiters used by Lo-Dash are similar to those
|
* By default, the template delimiters used by Lo-Dash are like those in
|
||||||
* in embedded Ruby (ERB). Change the following template settings to use
|
* embedded Ruby (ERB). Change the following template settings to use
|
||||||
* alternative delimiters.
|
* alternative delimiters.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
@@ -3903,7 +3903,7 @@
|
|||||||
* // => 2
|
* // => 2
|
||||||
*
|
*
|
||||||
* // using "_.where" callback shorthand
|
* // using "_.where" callback shorthand
|
||||||
* _.findLastIndex(users, { 'age': 40});
|
* _.findLastIndex(users, { 'age': 40 });
|
||||||
* // => 1
|
* // => 1
|
||||||
*
|
*
|
||||||
* // using "_.pluck" callback shorthand
|
* // using "_.pluck" callback shorthand
|
||||||
@@ -4856,10 +4856,10 @@
|
|||||||
* ];
|
* ];
|
||||||
*
|
*
|
||||||
* var youngest = _.chain(users)
|
* var youngest = _.chain(users)
|
||||||
* .sortBy('age')
|
* .sortBy('age')
|
||||||
* .map(function(chr) { return chr.user + ' is ' + chr.age; })
|
* .map(function(chr) { return chr.user + ' is ' + chr.age; })
|
||||||
* .first()
|
* .first()
|
||||||
* .value();
|
* .value();
|
||||||
* // => 'pebbles is 1'
|
* // => 'pebbles is 1'
|
||||||
*/
|
*/
|
||||||
function chain(value) {
|
function chain(value) {
|
||||||
@@ -4937,9 +4937,9 @@
|
|||||||
* // with explicit chaining
|
* // with explicit chaining
|
||||||
* _(users).chain()
|
* _(users).chain()
|
||||||
* .first()
|
* .first()
|
||||||
* .pick('age')
|
* .pick('user')
|
||||||
* .value();
|
* .value();
|
||||||
* // => { 'age': 36 }
|
* // => { 'user': 'barney' }
|
||||||
*/
|
*/
|
||||||
function wrapperChain() {
|
function wrapperChain() {
|
||||||
return chain(this);
|
return chain(this);
|
||||||
@@ -5330,11 +5330,11 @@
|
|||||||
* { 'user': 'fred', 'age': 40, 'status': 'busy' }
|
* { 'user': 'fred', 'age': 40, 'status': 'busy' }
|
||||||
* ];
|
* ];
|
||||||
*
|
*
|
||||||
* _.findWhere(users, { 'status': 'busy' });
|
* _.result(_.findWhere(users, { 'status': 'busy' }), 'user');
|
||||||
* // => { 'user': 'barney', 'age': 36, 'status': 'busy' }
|
* // => 'barney'
|
||||||
*
|
*
|
||||||
* _.findWhere(users, { 'age': 40 });
|
* _.result(_.findWhere(users, { 'age': 40 }), 'user');
|
||||||
* // => { 'user': 'fred', 'age': 40, 'status': 'busy' }
|
* // => 'fred'
|
||||||
*/
|
*/
|
||||||
function findWhere(collection, source) {
|
function findWhere(collection, source) {
|
||||||
return find(collection, matches(source));
|
return find(collection, matches(source));
|
||||||
@@ -5538,8 +5538,8 @@
|
|||||||
* // => [3, 6, 9] (iteration order is not guaranteed)
|
* // => [3, 6, 9] (iteration order is not guaranteed)
|
||||||
*
|
*
|
||||||
* var users = [
|
* var users = [
|
||||||
* { 'user': 'barney', 'age': 36 },
|
* { 'user': 'barney' },
|
||||||
* { 'user': 'fred', 'age': 40 }
|
* { 'user': 'fred' }
|
||||||
* ];
|
* ];
|
||||||
*
|
*
|
||||||
* // using "_.pluck" callback shorthand
|
* // using "_.pluck" callback shorthand
|
||||||
@@ -6838,8 +6838,8 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a function that invokes `func` with `partial` arguments prepended
|
* Creates a function that invokes `func` with `partial` arguments prepended
|
||||||
* to those provided to the new function. This method is similar to `_.bind`
|
* to those provided to the new function. This method is like `_.bind` except
|
||||||
* except it does **not** alter the `this` binding.
|
* it does **not** alter the `this` binding.
|
||||||
*
|
*
|
||||||
* **Note:** This method does not set the `length` property of partially
|
* **Note:** This method does not set the `length` property of partially
|
||||||
* applied functions.
|
* applied functions.
|
||||||
@@ -6868,8 +6868,8 @@
|
|||||||
* This method is like `_.partial` except that partially applied arguments
|
* This method is like `_.partial` except that partially applied arguments
|
||||||
* are appended to those provided to the new function.
|
* are appended to those provided to the new function.
|
||||||
*
|
*
|
||||||
* **Note:** This method does not set the `length` property of partially applied
|
* **Note:** This method does not set the `length` property of partially
|
||||||
* functions.
|
* applied functions.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
@@ -6912,7 +6912,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Function
|
* @category Function
|
||||||
* @param {Function} func The function to rearrange arguments for.
|
* @param {Function} func The function to rearrange arguments for.
|
||||||
* @param {...(number|number[])} [indexes] The arranged argument indexes,
|
* @param {...(number|number[])} indexes The arranged argument indexes,
|
||||||
* specified as individual indexes or arrays of indexes.
|
* specified as individual indexes or arrays of indexes.
|
||||||
* @returns {Function} Returns the new function.
|
* @returns {Function} Returns the new function.
|
||||||
* @example
|
* @example
|
||||||
@@ -7045,8 +7045,8 @@
|
|||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* var users = [
|
* var users = [
|
||||||
* { 'user': 'barney', 'age': 36 },
|
* { 'user': 'barney' },
|
||||||
* { 'user': 'fred', 'age': 40 }
|
* { 'user': 'fred' }
|
||||||
* ];
|
* ];
|
||||||
*
|
*
|
||||||
* var shallow = _.clone(users);
|
* var shallow = _.clone(users);
|
||||||
@@ -7101,8 +7101,8 @@
|
|||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* var users = [
|
* var users = [
|
||||||
* { 'user': 'barney', 'age': 36 },
|
* { 'user': 'barney' },
|
||||||
* { 'user': 'fred', 'age': 40 }
|
* { 'user': 'fred' }
|
||||||
* ];
|
* ];
|
||||||
*
|
*
|
||||||
* var deep = _.cloneDeep(users);
|
* var deep = _.cloneDeep(users);
|
||||||
@@ -9305,7 +9305,7 @@
|
|||||||
* };
|
* };
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
* _.filter(users, 'age__gt38');
|
* _.filter(users, 'age__gt36');
|
||||||
* // => [{ 'user': 'fred', 'age': 40 }]
|
* // => [{ 'user': 'fred', 'age': 40 }]
|
||||||
*/
|
*/
|
||||||
function callback(func, thisArg, guard) {
|
function callback(func, thisArg, guard) {
|
||||||
@@ -9604,8 +9604,8 @@
|
|||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* var users = [
|
* var users = [
|
||||||
* { 'user': 'fred', 'age': 40 },
|
* { 'user': 'fred' },
|
||||||
* { 'user': 'barney', 'age': 36 }
|
* { 'user': 'barney' }
|
||||||
* ];
|
* ];
|
||||||
*
|
*
|
||||||
* var getName = _.property('user');
|
* var getName = _.property('user');
|
||||||
|
|||||||
Reference in New Issue
Block a user