diff --git a/VERSION.html b/VERSION.html index 629a8c4..43d5816 100644 --- a/VERSION.html +++ b/VERSION.html @@ -392,7 +392,7 @@
-

VERSION source

+

VERSION source

_.VERSION

(string): The semantic version number.

diff --git a/add.html b/add.html index 61403ec..311554e 100644 --- a/add.html +++ b/add.html @@ -392,7 +392,7 @@
-

add source npm

+

add source npm

_.add(augend, addend)

相加两个数

diff --git a/all.html b/all.html index 9a27811..0002863 100644 --- a/all.html +++ b/all.html @@ -9883,7 +9883,7 @@

示例

})();
-

add source npm

+

add source npm

_.add(augend, addend)

相加两个数

@@ -9931,7 +9931,7 @@

示例

})();
-

ceil source npm

+

ceil source npm

_.ceil(number, [precision=0])

根据 precision 向上舍入 number

@@ -9985,7 +9985,7 @@

示例

})();
-

floor source npm

+

floor source npm

_.floor(number, [precision=0])

根据 precision 向下保留 number

@@ -10039,7 +10039,7 @@

示例

})();
-

max source npm

+

max source npm

_.max(array)

计算 array 中最大的值。 @@ -10089,7 +10089,7 @@

示例

})();
-

maxBy source npm

+

maxBy source npm

_.maxBy(array, [iteratee=_.identity])

这个方法类似 _.max @@ -10148,7 +10148,7 @@

示例

})();
-

mean source npm

+

mean source npm

_.mean(array)

计算 array 的平均值。

@@ -10194,7 +10194,7 @@

示例

})();
-

min source npm

+

min source npm

_.min(array)

计算 array 中最小的值。 如果 array 是 空的或者假值将会返回 undefined。

@@ -10243,7 +10243,7 @@

示例

})();
-

minBy source npm

+

minBy source npm

_.minBy(array, [iteratee=_.identity])

这个方法类似 _.min。 @@ -10301,7 +10301,7 @@

示例

})();
-

round source npm

+

round source npm

_.round(number, [precision=0])

根据 precision 四舍五入 number。

@@ -10355,7 +10355,7 @@

示例

})();
-

subtract source npm

+

subtract source npm

_.subtract(minuend, subtrahend)

两双相减

@@ -10403,7 +10403,7 @@

示例

})();
-

sum source npm

+

sum source npm

_.sum(array)

计算 array 中值的总和

@@ -10449,7 +10449,7 @@

示例

})();
-

sumBy source npm

+

sumBy source npm

_.sumBy(array, [iteratee=_.identity])

这个方法类似 _.sum。 @@ -10579,7 +10579,7 @@

返回值 (number)

})();
-

clamp source npm

+

clamp source npm

_.clamp(number, [min], max)

返回限制在 minmax 之间的值

@@ -10632,7 +10632,7 @@

示例

})();
-

inRange source npm

+

inRange source npm

_.inRange(number, [start=0], end)

检查 n 是否在 startend 之间,但不包括 end。 @@ -10702,7 +10702,7 @@

示例

})();
-

random source npm

+

random source npm

_.random([min=0], [max=1], [floating])

产生一个包括 minmax 之间的数。 @@ -11015,21 +11015,21 @@

示例

})();
-

at source npm

+

at source npm

_.at(object, [paths])
-

Creates an array of values corresponding to paths of object.

+

根据 object 的路径获取值为数组。

参数

    -
  1. object (Object)

    The object to iterate over.

    +
  2. object (Object)

    要遍历的对象

  3. -
  4. [paths] (...(string|string[])

    The property paths of elements to pick, specified individually or in arrays.

    +
  5. [paths] (...(string|string[])

    要获取的对象的元素路径,单独指定或者指定在数组中

返回值 (Array)

-

Returns the new array of picked elements.

+

返回选中值的数组

示例

var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
@@ -11068,22 +11068,22 @@ 

示例

})();
-

create source npm

+

create source npm

_.create(prototype, [properties])
-

Creates an object that inherits from the prototype object. If a properties -object is provided its own enumerable properties are assigned to the created object.

+

创建一个继承 prototype 的对象。 +如果提供了 properties,它的可枚举属性会被分配到创建的对象上。

参数

    -
  1. prototype (Object)

    The object to inherit from.

    +
  2. prototype (Object)

    要继承的对象

  3. -
  4. [properties] (Object)

    The properties to assign to the object.

    +
  5. [properties] (Object)

    待分配的属性

返回值 (Object)

-

Returns the new object.

+

返回新对象

示例

function Shape() {
@@ -11134,13 +11134,12 @@ 

示例

})();
-

defaults source npm

+

defaults source npm

_.defaults(object, [sources])
-

Assigns own and inherited enumerable properties of source objects to the -destination object for all destination properties that resolve to undefined. -Source objects are applied from left to right. Once a property is set, -additional values of the same property are ignored. +

分配来源对象的可枚举属性到目标对象所有解析为 undefined 的属性上。 +来源对象从左到右应用。 +一旦设置了相同属性的值,后续的将被忽略掉。

注意: 这方法会改变源对象

@@ -11188,11 +11187,10 @@

示例

})();
-

defaultsDeep source npm

+

defaultsDeep source npm

_.defaultsDeep(object, [sources])
-

这个方法类似 _.defaults except that it recursively assigns -default properties. +

这个方法类似 _.defaults,除了它会递归分配默认属性。

注意: 这方法会改变源对象

@@ -11240,22 +11238,22 @@

示例

})();
-

findKey source npm

+

findKey source npm

_.findKey(object, [predicate=_.identity])
-

这个方法类似 _.find except that it returns the key of the first -element predicate returns truthy for instead of the element itself.

+

这个方法类似 _.find。 +除了它返回最先被 predicate 判断为真值的元素 key,而不是元素本身。

参数

    -
  1. object (Object)

    The object to search.

    +
  2. object (Object)

    需要检索的对象

  3. [predicate=_.identity] (Function|Object|string)

    这个函数会处理每一个元素

返回值 (string|undefined)

-

Returns the key of the matched element, else undefined.

+

返回匹配的 key,否则返回 undefined

示例

var users = {
@@ -11307,22 +11305,22 @@ 

示例

})();
-

findLastKey source npm

+

findLastKey source npm

_.findLastKey(object, [predicate=_.identity])
-

这个方法类似 _.findKey except that it iterates over elements of -a collection in the opposite order.

+

这个方法类似 _.findKey。 +不过它是反方向开始遍历的。

参数

    -
  1. object (Object)

    The object to search.

    +
  2. object (Object)

    需要检索的对象

  3. [predicate=_.identity] (Function|Object|string)

    这个函数会处理每一个元素

返回值 (string|undefined)

-

Returns the key of the matched element, else undefined.

+

返回匹配的 key,否则返回 undefined

示例

var users = {
@@ -11332,7 +11330,7 @@ 

示例

}; _.findLastKey(users, function(o) { return o.age < 40; }); -// => returns 'pebbles' assuming `_.findKey` returns 'barney' +// => 返回 'pebbles', `_.findKey` 会返回 'barney' // 使用了 `_.matches` 的回调结果 _.findLastKey(users, { 'age': 36, 'active': true }); @@ -11374,18 +11372,17 @@

示例

})();
-

forIn source npm

+

forIn source npm

_.forIn(object, [iteratee=_.identity])
-

Iterates over own and inherited enumerable properties of an object invoking -iteratee for each property. The iteratee is invoked with three arguments:
-(value, key, object). Iteratee functions may exit iteration early by explicitly -returning false.

+

使用 iteratee 遍历对象的自身和继承的可枚举属性。 +iteratee 会传入3个参数:(value, key, object)。 +如果返回 false,iteratee 会提前退出遍历。

参数

    -
  1. object (Object)

    The object to iterate over.

    +
  2. object (Object)

    要遍历的对象

  3. [iteratee=_.identity] (Function)

    这个函数会处理每一个元素

  4. @@ -11404,7 +11401,7 @@

    示例

    _.forIn(new Foo, function(value, key) { console.log(key); }); -// => logs 'a', 'b', then 'c' (无法保证遍历的顺序) +// => 输出 'a', 'b', 然后 'c' (无法保证遍历的顺序)
@@ -11434,16 +11431,16 @@

示例

})();
-

forInRight source npm

+

forInRight source npm

_.forInRight(object, [iteratee=_.identity])
-

这个方法类似 _.forIn except that it iterates over properties of -object in the opposite order.

+

这个方法类似 _.forIn。 +除了它是反方向开始遍历的。

参数

    -
  1. object (Object)

    The object to iterate over.

    +
  2. object (Object)

    要遍历的对象

  3. [iteratee=_.identity] (Function)

    这个函数会处理每一个元素

  4. @@ -11462,7 +11459,7 @@

    示例

    _.forInRight(new Foo, function(value, key) { console.log(key); }); -// => logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c' +// => 输出 'c', 'b', 然后 'a', `_.forIn` 会输出 'a', 'b', 然后 'c'
@@ -11492,18 +11489,16 @@

示例

})();
-

forOwn source npm

+

forOwn source npm

_.forOwn(object, [iteratee=_.identity])
-

Iterates over own enumerable properties of an object invoking iteratee -for each property. The iteratee is invoked with three arguments:
-(value, key, object). Iteratee functions may exit iteration early by -explicitly returning false.

+

使用 iteratee 遍历自身的可枚举属性。 +iteratee 会传入3个参数:(value, key, object)。 如果返回 false,iteratee 会提前退出遍历。

参数

    -
  1. object (Object)

    The object to iterate over.

    +
  2. object (Object)

    要遍历的对象

  3. [iteratee=_.identity] (Function)

    这个函数会处理每一个元素

  4. @@ -11522,7 +11517,7 @@

    示例

    _.forOwn(new Foo, function(value, key) { console.log(key); }); -// => logs 'a' then 'b' (无法保证遍历的顺序) +// => 输出 'a' 然后 'b' (无法保证遍历的顺序)
@@ -11552,16 +11547,15 @@

示例

})();
-

forOwnRight source npm

+

forOwnRight source npm

_.forOwnRight(object, [iteratee=_.identity])
-

这个方法类似 _.forOwn except that it iterates over properties of -object in the opposite order.

+

这个方法类似 _.forOwn。 除了它是反方向开始遍历的。

参数

    -
  1. object (Object)

    The object to iterate over.

    +
  2. object (Object)

    要遍历的对象

  3. [iteratee=_.identity] (Function)

    这个函数会处理每一个元素

  4. @@ -11580,7 +11574,7 @@

    示例

    _.forOwnRight(new Foo, function(value, key) { console.log(key); }); -// => logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b' +// => 输出 'b' 然后 'a', `_.forOwn` 会输出 'a' 然后 'b'
@@ -11610,20 +11604,19 @@

示例

})();
-

functions source npm

+

functions source npm

_.functions(object)
-

Creates an array of function property names from own enumerable properties -of object.

+

返回一个 function 对象自身可枚举属性名的数组。

参数

    -
  1. object (Object)

    The object to inspect.

    +
  2. object (Object)

    要检索的对象

返回值 (Array)

-

Returns the new array of property names.

+

返回包含属性名的新数组

示例

function Foo() {
@@ -11664,20 +11657,19 @@ 

示例

})();
-

functionsIn source npm

+

functionsIn source npm

_.functionsIn(object)
-

Creates an array of function property names from own and inherited -enumerable properties of object.

+

返回一个 function 对象自身和继承的可枚举属性名的数组。

参数

    -
  1. object (Object)

    The object to inspect.

    +
  2. object (Object)

    要检索的对象

返回值 (Array)

-

Returns the new array of property names.

+

返回包含属性名的新数组

示例

function Foo() {
@@ -11718,24 +11710,24 @@ 

示例

})();
-

get source npm

+

get source npm

_.get(object, path, [defaultValue])
-

Gets the value at path of object. If the resolved value is -undefined the defaultValue is used in its place.

+

根据对象路径获取值。 +如果解析 value 是 undefined 会以 defaultValue 取代。

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

  3. -
  4. path (Array|string)

    The path of the property to get.

    +
  5. path (Array|string)

    要获取的对象路径

  6. -
  7. [defaultValue] (*)

    The value returned if the resolved value is undefined.

    +
  8. [defaultValue] (*)

    如果解析值是 undefined,这值会被返回

返回值 (*)

-

Returns the resolved value.

+

返回解析的值

示例

var object = { 'a': [{ 'b': { 'c': 3 } }] };
@@ -11777,21 +11769,21 @@ 

示例

})();
-

has source npm

+

has source npm

_.has(object, path)
-

Checks if path is a direct property of object.

+

检查 path 是否是对象的直接属性。

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

  3. -
  4. path (Array|string)

    The path to check.

    +
  5. path (Array|string)

    要检查的路径

返回值 (boolean)

-

Returns true if path exists否则返回 false

+

如果存在返回 true,否则返回 false

示例

var object = { 'a': { 'b': { 'c': 3 } } };
@@ -11837,21 +11829,21 @@ 

示例

})();
-

hasIn source npm

+

hasIn source npm

_.hasIn(object, path)
-

Checks if path is a direct or inherited property of object.

+

检查 path 是否是对象的直接 或者 继承属性。

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

  3. -
  4. path (Array|string)

    The path to check.

    +
  5. path (Array|string)

    要检查的路径

返回值 (boolean)

-

Returns true if path exists否则返回 false

+

如果存在返回 true,否则返回 false

示例

var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
@@ -11896,23 +11888,23 @@ 

示例

})();
-

invert source npm

+

invert source npm

_.invert(object, [multiVal])
-

Creates an object composed of the inverted keys and values of object. -If object contains duplicate values, subsequent values overwrite property -assignments of previous values unless multiVal is true.

+

创建一个键值倒置的对象。 +如果 object 有重复的值,后面的值会覆盖前面的值。 +如果 multiVal 为 true,重复的值则组成数组。

参数

    -
  1. object (Object)

    The object to invert.

    +
  2. object (Object)

    要倒置的对象

  3. -
  4. [multiVal] (boolean)

    Allow multiple values per key.

    +
  5. [multiVal] (boolean)

    每个 key 允许多个值

返回值 (Object)

-

Returns the new inverted object.

+

返回新的倒置的对象

示例

var object = { 'a': 1, 'b': 2, 'c': 1 };
@@ -11920,7 +11912,7 @@ 

示例

_.invert(object); // => { '1': 'c', '2': 'b' } -// with `multiVal` +// 使用 `multiVal` _.invert(object, true); // => { '1': ['a', 'c'], '2': ['b'] }
@@ -11952,23 +11944,23 @@

示例

})();
-

invoke source npm

+

invoke source npm

_.invoke(object, path, [args])
-

Invokes the method at path of object.

+

调用对象路径的方法

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

  3. -
  4. path (Array|string)

    The path of the method to invoke.

    +
  5. path (Array|string)

    要调用方法的路径

  6. -
  7. [args] (...*)

    The arguments to invoke the method with.

    +
  8. [args] (...*)

    调用方法的参数

返回值 (*)

-

Returns the result of the invoked method.

+

返回调用方法的结果

示例

var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
@@ -12004,24 +11996,24 @@ 

示例

})();
-

keys source npm

+

keys source npm

_.keys(object)
-

Creates an array of the own enumerable property names of object. +

创建 object 自身可枚举属性名为一个数组。

-注意: Non-object values are coerced to objects. See the +注意: 非对象的值会被强制转换为对象,查看 ES spec -for more details.

+了解详情

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

返回值 (Array)

-

Returns the array of property names.

+

返回包含属性名的数组

示例

function Foo() {
@@ -12065,22 +12057,22 @@ 

示例

})();
-

keysIn source npm

+

keysIn source npm

_.keysIn(object)
-

Creates an array of the own and inherited enumerable property names of object. +

创建 object 自身 或 继承的可枚举属性名为一个数组。

-注意: Non-object values are coerced to objects.

+注意: 非对象的值会被强制转换为对象

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

返回值 (Array)

-

Returns the array of property names.

+

返回包含属性名的数组

示例

function Foo() {
@@ -12121,23 +12113,22 @@ 

示例

})();
-

mapKeys source npm

+

mapKeys source npm

_.mapKeys(object, [iteratee=_.identity])
-

The opposite of _.mapValues; this method creates an object with the -same values as object and keys generated by running each own enumerable -property of object through iteratee.

+

反向版 _.mapValues。 +这个方法创建一个对象,对象的值与源对象相同,但 key 是通过 iteratee 产生的。

参数

    -
  1. object (Object)

    The object to iterate over.

    +
  2. object (Object)

    要遍历的对象

  3. [iteratee=_.identity] (Function|Object|string)

    这个函数会处理每一个元素

返回值 (Object)

-

Returns the new mapped object.

+

返回映射后的新对象

示例

_.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
@@ -12173,23 +12164,22 @@ 

示例

})();
-

mapValues source npm

+

mapValues source npm

_.mapValues(object, [iteratee=_.identity])
-

Creates an object with the same keys as object and values generated by -running each own enumerable property of object through iteratee. The -iteratee function is invoked with three arguments: (value, key, object).

+

创建一个对象,对象的key相同,值是通过 iteratee 产生的。 +iteratee 会传入3个参数: (value, key, object)

参数

    -
  1. object (Object)

    The object to iterate over.

    +
  2. object (Object)

    要遍历的对象

  3. [iteratee=_.identity] (Function|Object|string)

    这个函数会处理每一个元素

返回值 (Object)

-

Returns the new mapped object.

+

返回映射后的对象

示例

var users = {
@@ -12232,7 +12222,7 @@ 

示例

})();
-

merge source npm

+

merge source npm

_.merge(object, [sources])

Recursively merges own and inherited enumerable properties of source @@ -12296,7 +12286,7 @@

示例

})();
-

mergeWith source npm

+

mergeWith source npm

_.mergeWith(object, sources, customizer)

这个方法类似 _.merge except that it accepts customizer which @@ -12366,7 +12356,7 @@

示例

})();
-

omit source npm

+

omit source npm

_.omit(object, [props])

The opposite of _.pick; this method creates an object composed of the @@ -12417,7 +12407,7 @@

示例

})();
-

omitBy source npm

+

omitBy source npm

_.omitBy(object, [predicate=_.identity])

The opposite of _.pickBy; this method creates an object composed of the @@ -12469,7 +12459,7 @@

示例

})();
-

pick source npm

+

pick source npm

_.pick(object, [props])

Creates an object composed of the picked object properties.

@@ -12519,7 +12509,7 @@

示例

})();
-

pickBy source npm

+

pickBy source npm

_.pickBy(object, [predicate=_.identity])

Creates an object composed of the object properties predicate returns @@ -12570,7 +12560,7 @@

示例

})();
-

result source npm

+

result source npm

_.result(object, path, [defaultValue])

这个方法类似 _.get except that if the resolved value is a function @@ -12580,7 +12570,7 @@

示例

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

  3. path (Array|string)

    The path of the property to resolve.

  4. @@ -12633,7 +12623,7 @@

    示例

    })();
-

set source npm

+

set source npm

_.set(object, path, value)

Sets the value at path of object. If a portion of path doesn't exist @@ -12693,7 +12683,7 @@

示例

})();
-

setWith source npm

+

setWith source npm

_.setWith(object, path, value, [customizer])

这个方法类似 _.set except that it accepts customizer which is @@ -12748,7 +12738,7 @@

示例

})();
-

toPairs source npm

+

toPairs source npm

_.toPairs(object)

Creates an array of own enumerable key-value pairs for object.

@@ -12756,7 +12746,7 @@

示例

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

返回值 (Array)

@@ -12801,7 +12791,7 @@

示例

})();
-

toPairsIn source npm

+

toPairsIn source npm

_.toPairsIn(object)

Creates an array of own and inherited enumerable key-value pairs for object.

@@ -12809,7 +12799,7 @@

示例

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

返回值 (Array)

@@ -12854,7 +12844,7 @@

示例

})();
-

transform source npm

+

transform source npm

_.transform(object, [iteratee=_.identity], [accumulator])

An alternative to _.reduce; this method transforms object to a new @@ -12867,7 +12857,7 @@

示例

参数

    -
  1. object (Array|Object)

    The object to iterate over.

    +
  2. object (Array|Object)

    要遍历的对象

  3. [iteratee=_.identity] (Function)

    这个函数会处理每一个元素

  4. @@ -12917,7 +12907,7 @@

    示例

    })();
-

unset source npm

+

unset source npm

_.unset(object, path)

Removes the property at path of object.

@@ -12975,7 +12965,7 @@

示例

})();
-

values source npm

+

values source npm

_.values(object)

Creates an array of the own enumerable property values of object. @@ -12986,7 +12976,7 @@

示例

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

返回值 (Array)

@@ -13034,7 +13024,7 @@

示例

})();
-

valuesIn source npm

+

valuesIn source npm

_.valuesIn(object)

Creates an array of the own and inherited enumerable property values of object. @@ -13045,7 +13035,7 @@

示例

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

返回值 (Array)

@@ -13290,7 +13280,7 @@

示例

})();
-

VERSION source

+

VERSION source

_.VERSION

(string): The semantic version number.

@@ -13323,7 +13313,7 @@

示例

})();
-

camelCase source npm

+

camelCase source npm

_.camelCase([string=''])

Converts string to camel case.

@@ -13375,7 +13365,7 @@

示例

})();
-

capitalize source npm

+

capitalize source npm

_.capitalize([string=''])

Converts the first character of string to upper case and the remaining @@ -13422,7 +13412,7 @@

示例

})();
-

deburr source npm

+

deburr source npm

_.deburr([string=''])

Deburrs string by converting latin-1 supplementary letters#Character_table) @@ -13469,7 +13459,7 @@

示例

})();
-

endsWith source npm

+

endsWith source npm

_.endsWith([string=''], [target], [position=string.length])

Checks if string ends with the given target string.

@@ -13525,7 +13515,7 @@

示例

})();
-

escape source npm

+

escape source npm

_.escape([string=''])

Converts the characters "&", "<", ">", '"', "'", and "`" in string to @@ -13540,14 +13530,14 @@

示例

">" and "/" don't need escaping in HTML and have no special meaning unless they're part of a tag or unquoted attribute value. See Mathias Bynens's article -(under "semi-related fun fact") for more details. +(under "semi-related fun fact") 了解详情

Backticks are escaped because in IE < 9, they can break out of attribute values or HTML comments. See #59, #102, #108, and #133 of the HTML5 Security Cheatsheet -for more details. +了解详情

When working with HTML you should always quote attribute values @@ -13594,7 +13584,7 @@

示例

})();
-

escapeRegExp source npm

+

escapeRegExp source npm

_.escapeRegExp([string=''])

Escapes the RegExp special characters "^", "$", "\", ".", "*", "+", @@ -13641,7 +13631,7 @@

示例

})();
-

kebabCase source npm

+

kebabCase source npm

_.kebabCase([string=''])

Converts string to kebab case.

@@ -13693,7 +13683,7 @@

示例

})();
-

lowerCase source npm

+

lowerCase source npm

_.lowerCase([string=''])

Converts string, as space separated words, to lower case.

@@ -13745,7 +13735,7 @@

示例

})();
-

lowerFirst source npm

+

lowerFirst source npm

_.lowerFirst([string=''])

Converts the first character of string to lower case.

@@ -13794,7 +13784,7 @@

示例

})();
-

pad source npm

+

pad source npm

_.pad([string=''], [length=0], [chars=' '])

Pads string on the left and right sides if it's shorter than length. @@ -13851,7 +13841,7 @@

示例

})();
-

padEnd source npm

+

padEnd source npm

_.padEnd([string=''], [length=0], [chars=' '])

Pads string on the right side if it's shorter than length. Padding @@ -13908,7 +13898,7 @@

示例

})();
-

padStart source npm

+

padStart source npm

_.padStart([string=''], [length=0], [chars=' '])

Pads string on the left side if it's shorter than length. Padding @@ -13965,7 +13955,7 @@

示例

})();
-

parseInt source npm

+

parseInt source npm

_.parseInt(string, [radix])

Converts string to an integer of the specified radix. If radix is @@ -14022,7 +14012,7 @@

示例

})();
-

repeat source npm

+

repeat source npm

_.repeat([string=''], [n=0])

Repeats the given string n times.

@@ -14076,7 +14066,7 @@

示例

})();
-

replace source npm

+

replace source npm

_.replace([string=''], pattern, replacement)

Replaces matches for pattern in string with replacement. @@ -14129,7 +14119,7 @@

示例

})();
-

snakeCase source npm

+

snakeCase source npm

_.snakeCase([string=''])

Converts string to snake case.

@@ -14181,7 +14171,7 @@

示例

})();
-

split source npm

+

split source npm

_.split([string=''], separator, [limit])

Splits string by separator. @@ -14234,7 +14224,7 @@

示例

})();
-

startCase source npm

+

startCase source npm

_.startCase([string=''])

Converts string to start case.

@@ -14286,7 +14276,7 @@

示例

})();
-

startsWith source npm

+

startsWith source npm

_.startsWith([string=''], [target], [position=0])

Checks if string starts with the given target string.

@@ -14342,7 +14332,7 @@

示例

})();
-

template source npm

+

template source npm

_.template([string=''], [options])

Creates a compiled template function that can interpolate data properties @@ -14480,7 +14470,7 @@

示例

})();
-

toLower source npm

+

toLower source npm

_.toLower([string=''])

Converts string, as a whole, to lower case.

@@ -14532,7 +14522,7 @@

示例

})();
-

toUpper source npm

+

toUpper source npm

_.toUpper([string=''])

Converts string, as a whole, to upper case.

@@ -14584,7 +14574,7 @@

示例

})();
-

trim source npm

+

trim source npm

_.trim([string=''], [chars=whitespace])

Removes leading and trailing whitespace or specified characters from string.

@@ -14638,7 +14628,7 @@

示例

})();
-

trimEnd source npm

+

trimEnd source npm

_.trimEnd([string=''], [chars=whitespace])

Removes trailing whitespace or specified characters from string.

@@ -14689,7 +14679,7 @@

示例

})();
-

trimStart source npm

+

trimStart source npm

_.trimStart([string=''], [chars=whitespace])

Removes leading whitespace or specified characters from string.

@@ -14740,7 +14730,7 @@

示例

})();
-

truncate source npm

+

truncate source npm

_.truncate([string=''], [options])

Truncates string if it's longer than the given maximum string length. @@ -14813,7 +14803,7 @@

示例

})();
-

unescape source npm

+

unescape source npm

_.unescape([string=''])

The inverse of _.escape; this method converts the HTML entities @@ -14865,7 +14855,7 @@

示例

})();
-

upperCase source npm

+

upperCase source npm

_.upperCase([string=''])

Converts string, as space separated words, to upper case.

@@ -14917,7 +14907,7 @@

示例

})();
-

upperFirst source npm

+

upperFirst source npm

_.upperFirst([string=''])

Converts the first character of string to upper case.

@@ -14966,7 +14956,7 @@

示例

})();
-

words source npm

+

words source npm

_.words([string=''], [pattern])

Splits string into an array of its words.

@@ -15017,7 +15007,7 @@

示例

})();
-

attempt source npm

+

attempt source npm

_.attempt(func)

Attempts to invoke func, returning either the result or the caught error @@ -15070,7 +15060,7 @@

示例

})();
-

bindAll source npm

+

bindAll source npm

_.bindAll(object, methodNames)

Binds methods of an object to the object itself, overwriting the existing @@ -15130,7 +15120,7 @@

示例

})();
-

cond source npm

+

cond source npm

_.cond(pairs)

Creates a function that iterates over pairs invoking the corresponding @@ -15191,7 +15181,7 @@

示例

})();
-

conforms source npm

+

conforms source npm

_.conforms(source)

Creates a function that invokes the predicate properties of source with @@ -15244,7 +15234,7 @@

示例

})();
-

constant source npm

+

constant source npm

_.constant(value)

Creates a function that returns value.

@@ -15293,7 +15283,7 @@

示例

})();
-

flow source npm

+

flow source npm

_.flow([funcs])

Creates a function that returns the result of invoking the provided @@ -15346,7 +15336,7 @@

示例

})();
-

flowRight source npm

+

flowRight source npm

_.flowRight([funcs])

这个方法类似 _.flow except that it creates a function that @@ -15398,7 +15388,7 @@

示例

})();
-

identity source npm

+

identity source npm

_.identity(value)

This method returns the first argument provided to it.

@@ -15446,7 +15436,7 @@

示例

})();
-

iteratee source npm

+

iteratee source npm

_.iteratee([func=_.identity])

创建一个调用 func 的函数。 with the arguments of the created @@ -15513,7 +15503,7 @@

示例

})();
-

matches source npm

+

matches source npm

_.matches(source)

Creates a function that performs a deep partial comparison between a given @@ -15569,7 +15559,7 @@

示例

})();
-

matchesProperty source npm

+

matchesProperty source npm

_.matchesProperty(path, srcValue)

Creates a function that performs a deep partial comparison between the @@ -15627,7 +15617,7 @@

示例

})();
-

method source npm

+

method source npm

_.method(path, [args])

Creates a function that invokes the method at path of a given object. @@ -15684,7 +15674,7 @@

示例

})();
-

methodOf source npm

+

methodOf source npm

_.methodOf(object, [args])

The opposite of _.method; this method creates a function that invokes @@ -15694,7 +15684,7 @@

示例

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

  3. [args] (...*)

    The arguments to invoke the method with.

  4. @@ -15740,7 +15730,7 @@

    示例

    })();
-

mixin source npm

+

mixin source npm

_.mixin([object=lodash], source, [options])

Adds all own enumerable function properties of a source object to the @@ -15812,7 +15802,7 @@

示例

})();
-

noConflict source npm

+

noConflict source npm

_.noConflict()

Reverts the _ variable to its previous value and returns a reference to @@ -15853,7 +15843,7 @@

示例

})();
-

noop source npm

+

noop source npm

_.noop()

A no-operation function that returns undefined regardless of the @@ -15894,7 +15884,7 @@

示例

})();
-

nthArg source npm

+

nthArg source npm

_.nthArg([n=0])

Creates a function that returns its nth argument.

@@ -15942,7 +15932,7 @@

示例

})();
-

over source npm

+

over source npm

_.over(iteratees)

Creates a function that invokes iteratees with the arguments provided @@ -15991,7 +15981,7 @@

示例

})();
-

overEvery source npm

+

overEvery source npm

_.overEvery(predicates)

Creates a function that checks if all of the predicates return @@ -16046,7 +16036,7 @@

示例

})();
-

overSome source npm

+

overSome source npm

_.overSome(predicates)

Creates a function that checks if any of the predicates return @@ -16101,7 +16091,7 @@

示例

})();
-

property source npm

+

property source npm

_.property(path)

Creates a function that returns the value at path of a given object.

@@ -16155,7 +16145,7 @@

示例

})();
-

propertyOf source npm

+

propertyOf source npm

_.propertyOf(object)

The opposite of _.property; this method creates a function that returns @@ -16164,7 +16154,7 @@

示例

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

返回值 (Function)

@@ -16208,7 +16198,7 @@

示例

})();
-

range source npm

+

range source npm

_.range([start=0], end, [step=1])

Creates an array of numbers (positive and/or negative) progressing from @@ -16284,7 +16274,7 @@

示例

})();
-

rangeRight source npm

+

rangeRight source npm

_.rangeRight([start=0], end, [step=1])

这个方法类似 _.range except that it populates values in @@ -16421,7 +16411,7 @@

示例

})();
-

times source npm

+

times source npm

_.times(n, [iteratee=_.identity])

Invokes the iteratee function n times, returning an array of the results @@ -16473,7 +16463,7 @@

示例

})();
-

toPath source npm

+

toPath source npm

_.toPath(value)

Converts value to a property path array.

@@ -16531,7 +16521,7 @@

示例

})();
-

uniqueId source npm

+

uniqueId source npm

_.uniqueId([prefix])

Generates a unique ID. If prefix is provided the ID is appended to it.

diff --git a/at.html b/at.html index e564d1d..9b0b885 100644 --- a/at.html +++ b/at.html @@ -392,21 +392,21 @@
-

at source npm

+

at source npm

_.at(object, [paths])
-

Creates an array of values corresponding to paths of object.

+

根据 object 的路径获取值为数组。

参数

    -
  1. object (Object)

    The object to iterate over.

    +
  2. object (Object)

    要遍历的对象

  3. -
  4. [paths] (...(string|string[])

    The property paths of elements to pick, specified individually or in arrays.

    +
  5. [paths] (...(string|string[])

    要获取的对象的元素路径,单独指定或者指定在数组中

返回值 (Array)

-

Returns the new array of picked elements.

+

返回选中值的数组

示例

var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
diff --git a/attempt.html b/attempt.html
index 096e56d..f8c53ed 100644
--- a/attempt.html
+++ b/attempt.html
@@ -392,7 +392,7 @@
 
 
-

attempt source npm

+

attempt source npm

_.attempt(func)

Attempts to invoke func, returning either the result or the caught error diff --git a/bindAll.html b/bindAll.html index 7938df8..e545b6e 100644 --- a/bindAll.html +++ b/bindAll.html @@ -392,7 +392,7 @@

-

bindAll source npm

+

bindAll source npm

_.bindAll(object, methodNames)

Binds methods of an object to the object itself, overwriting the existing diff --git a/camelCase.html b/camelCase.html index bd41c2d..c33267e 100644 --- a/camelCase.html +++ b/camelCase.html @@ -392,7 +392,7 @@

-

camelCase source npm

+

camelCase source npm

_.camelCase([string=''])

Converts string to camel case.

diff --git a/capitalize.html b/capitalize.html index 16a2773..fd1b98f 100644 --- a/capitalize.html +++ b/capitalize.html @@ -392,7 +392,7 @@
-

capitalize source npm

+

capitalize source npm

_.capitalize([string=''])

Converts the first character of string to upper case and the remaining diff --git a/ceil.html b/ceil.html index 59f9f3d..43bb857 100644 --- a/ceil.html +++ b/ceil.html @@ -392,7 +392,7 @@

-

ceil source npm

+

ceil source npm

_.ceil(number, [precision=0])

根据 precision 向上舍入 number

diff --git a/clamp.html b/clamp.html index 76a6b22..6a11c78 100644 --- a/clamp.html +++ b/clamp.html @@ -392,7 +392,7 @@
-

clamp source npm

+

clamp source npm

_.clamp(number, [min], max)

返回限制在 minmax 之间的值

diff --git a/cond.html b/cond.html index 28129c1..8449645 100644 --- a/cond.html +++ b/cond.html @@ -392,7 +392,7 @@
-

cond source npm

+

cond source npm

_.cond(pairs)

Creates a function that iterates over pairs invoking the corresponding diff --git a/conforms.html b/conforms.html index 4c3a81a..0da718a 100644 --- a/conforms.html +++ b/conforms.html @@ -392,7 +392,7 @@

-

conforms source npm

+

conforms source npm

_.conforms(source)

Creates a function that invokes the predicate properties of source with diff --git a/constant.html b/constant.html index ae78e29..5d09f26 100644 --- a/constant.html +++ b/constant.html @@ -392,7 +392,7 @@

-

constant source npm

+

constant source npm

_.constant(value)

Creates a function that returns value.

diff --git a/create.html b/create.html index 5a0bc42..fb44c6d 100644 --- a/create.html +++ b/create.html @@ -392,22 +392,22 @@
-

create source npm

+

create source npm

_.create(prototype, [properties])
-

Creates an object that inherits from the prototype object. If a properties -object is provided its own enumerable properties are assigned to the created object.

+

创建一个继承 prototype 的对象。 +如果提供了 properties,它的可枚举属性会被分配到创建的对象上。

参数

    -
  1. prototype (Object)

    The object to inherit from.

    +
  2. prototype (Object)

    要继承的对象

  3. -
  4. [properties] (Object)

    The properties to assign to the object.

    +
  5. [properties] (Object)

    待分配的属性

返回值 (Object)

-

Returns the new object.

+

返回新对象

示例

function Shape() {
diff --git a/deburr.html b/deburr.html
index 68ea386..11165c0 100644
--- a/deburr.html
+++ b/deburr.html
@@ -392,7 +392,7 @@
 
 
-

deburr source npm

+

deburr source npm

_.deburr([string=''])

Deburrs string by converting latin-1 supplementary letters#Character_table) diff --git a/defaults.html b/defaults.html index 268df32..70ad811 100644 --- a/defaults.html +++ b/defaults.html @@ -392,13 +392,12 @@

-

defaults source npm

+

defaults source npm

_.defaults(object, [sources])
-

Assigns own and inherited enumerable properties of source objects to the -destination object for all destination properties that resolve to undefined. -Source objects are applied from left to right. Once a property is set, -additional values of the same property are ignored. +

分配来源对象的可枚举属性到目标对象所有解析为 undefined 的属性上。 +来源对象从左到右应用。 +一旦设置了相同属性的值,后续的将被忽略掉。

注意: 这方法会改变源对象

diff --git a/defaultsDeep.html b/defaultsDeep.html index 268ac29..59aa067 100644 --- a/defaultsDeep.html +++ b/defaultsDeep.html @@ -392,11 +392,10 @@
-

defaultsDeep source npm

+

defaultsDeep source npm

_.defaultsDeep(object, [sources])
-

这个方法类似 _.defaults except that it recursively assigns -default properties. +

这个方法类似 _.defaults,除了它会递归分配默认属性。

注意: 这方法会改变源对象

diff --git a/endsWith.html b/endsWith.html index 5437827..e0f886e 100644 --- a/endsWith.html +++ b/endsWith.html @@ -392,7 +392,7 @@
-

endsWith source npm

+

endsWith source npm

_.endsWith([string=''], [target], [position=string.length])

Checks if string ends with the given target string.

diff --git a/escape.html b/escape.html index 28a094b..0fc1a8e 100644 --- a/escape.html +++ b/escape.html @@ -392,7 +392,7 @@
-

escape source npm

+

escape source npm

_.escape([string=''])

Converts the characters "&", "<", ">", '"', "'", and "`" in string to @@ -407,14 +407,14 @@ ">" and "/" don't need escaping in HTML and have no special meaning unless they're part of a tag or unquoted attribute value. See Mathias Bynens's article -(under "semi-related fun fact") for more details. +(under "semi-related fun fact") 了解详情

Backticks are escaped because in IE < 9, they can break out of attribute values or HTML comments. See #59, #102, #108, and #133 of the HTML5 Security Cheatsheet -for more details. +了解详情

When working with HTML you should always quote attribute values diff --git a/escapeRegExp.html b/escapeRegExp.html index efa6098..9ef62b9 100644 --- a/escapeRegExp.html +++ b/escapeRegExp.html @@ -392,7 +392,7 @@

-

escapeRegExp source npm

+

escapeRegExp source npm

_.escapeRegExp([string=''])

Escapes the RegExp special characters "^", "$", "\", ".", "*", "+", diff --git a/findKey.html b/findKey.html index 9ada869..9428872 100644 --- a/findKey.html +++ b/findKey.html @@ -392,22 +392,22 @@

-

findKey source npm

+

findKey source npm

_.findKey(object, [predicate=_.identity])
-

这个方法类似 _.find except that it returns the key of the first -element predicate returns truthy for instead of the element itself.

+

这个方法类似 _.find。 +除了它返回最先被 predicate 判断为真值的元素 key,而不是元素本身。

参数

    -
  1. object (Object)

    The object to search.

    +
  2. object (Object)

    需要检索的对象

  3. [predicate=_.identity] (Function|Object|string)

    这个函数会处理每一个元素

返回值 (string|undefined)

-

Returns the key of the matched element, else undefined.

+

返回匹配的 key,否则返回 undefined

示例

var users = {
diff --git a/findLastKey.html b/findLastKey.html
index b2ae652..971c8eb 100644
--- a/findLastKey.html
+++ b/findLastKey.html
@@ -392,22 +392,22 @@
 
 
-

findLastKey source npm

+

findLastKey source npm

_.findLastKey(object, [predicate=_.identity])
-

这个方法类似 _.findKey except that it iterates over elements of -a collection in the opposite order.

+

这个方法类似 _.findKey。 +不过它是反方向开始遍历的。

参数

    -
  1. object (Object)

    The object to search.

    +
  2. object (Object)

    需要检索的对象

  3. [predicate=_.identity] (Function|Object|string)

    这个函数会处理每一个元素

返回值 (string|undefined)

-

Returns the key of the matched element, else undefined.

+

返回匹配的 key,否则返回 undefined

示例

var users = {
@@ -417,7 +417,7 @@ 

示例

}; _.findLastKey(users, function(o) { return o.age < 40; }); -// => returns 'pebbles' assuming `_.findKey` returns 'barney' +// => 返回 'pebbles', `_.findKey` 会返回 'barney' // 使用了 `_.matches` 的回调结果 _.findLastKey(users, { 'age': 36, 'active': true }); diff --git a/floor.html b/floor.html index 31696be..a790a4e 100644 --- a/floor.html +++ b/floor.html @@ -392,7 +392,7 @@
-

floor source npm

+

floor source npm

_.floor(number, [precision=0])

根据 precision 向下保留 number

diff --git a/flow.html b/flow.html index a7848bc..debc8a5 100644 --- a/flow.html +++ b/flow.html @@ -392,7 +392,7 @@
-

flow source npm

+

flow source npm

_.flow([funcs])

Creates a function that returns the result of invoking the provided diff --git a/flowRight.html b/flowRight.html index 6d8955a..036a60a 100644 --- a/flowRight.html +++ b/flowRight.html @@ -392,7 +392,7 @@

-

flowRight source npm

+

flowRight source npm

_.flowRight([funcs])

这个方法类似 _.flow except that it creates a function that diff --git a/forIn.html b/forIn.html index cb0dc30..5d33db5 100644 --- a/forIn.html +++ b/forIn.html @@ -392,18 +392,17 @@

-

forIn source npm

+

forIn source npm

_.forIn(object, [iteratee=_.identity])
-

Iterates over own and inherited enumerable properties of an object invoking -iteratee for each property. The iteratee is invoked with three arguments:
-(value, key, object). Iteratee functions may exit iteration early by explicitly -returning false.

+

使用 iteratee 遍历对象的自身和继承的可枚举属性。 +iteratee 会传入3个参数:(value, key, object)。 +如果返回 false,iteratee 会提前退出遍历。

参数

    -
  1. object (Object)

    The object to iterate over.

    +
  2. object (Object)

    要遍历的对象

  3. [iteratee=_.identity] (Function)

    这个函数会处理每一个元素

  4. @@ -422,7 +421,7 @@

    示例

    _.forIn(new Foo, function(value, key) { console.log(key); }); -// => logs 'a', 'b', then 'c' (无法保证遍历的顺序) +// => 输出 'a', 'b', 然后 'c' (无法保证遍历的顺序)
diff --git a/forInRight.html b/forInRight.html index 19496a1..34563d2 100644 --- a/forInRight.html +++ b/forInRight.html @@ -392,16 +392,16 @@
-

forInRight source npm

+

forInRight source npm

_.forInRight(object, [iteratee=_.identity])
-

这个方法类似 _.forIn except that it iterates over properties of -object in the opposite order.

+

这个方法类似 _.forIn。 +除了它是反方向开始遍历的。

参数

    -
  1. object (Object)

    The object to iterate over.

    +
  2. object (Object)

    要遍历的对象

  3. [iteratee=_.identity] (Function)

    这个函数会处理每一个元素

  4. @@ -420,7 +420,7 @@

    示例

    _.forInRight(new Foo, function(value, key) { console.log(key); }); -// => logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c' +// => 输出 'c', 'b', 然后 'a', `_.forIn` 会输出 'a', 'b', 然后 'c'
diff --git a/forOwn.html b/forOwn.html index 8a2a816..93c4229 100644 --- a/forOwn.html +++ b/forOwn.html @@ -392,18 +392,16 @@
-

forOwn source npm

+

forOwn source npm

_.forOwn(object, [iteratee=_.identity])
-

Iterates over own enumerable properties of an object invoking iteratee -for each property. The iteratee is invoked with three arguments:
-(value, key, object). Iteratee functions may exit iteration early by -explicitly returning false.

+

使用 iteratee 遍历自身的可枚举属性。 +iteratee 会传入3个参数:(value, key, object)。 如果返回 false,iteratee 会提前退出遍历。

参数

    -
  1. object (Object)

    The object to iterate over.

    +
  2. object (Object)

    要遍历的对象

  3. [iteratee=_.identity] (Function)

    这个函数会处理每一个元素

  4. @@ -422,7 +420,7 @@

    示例

    _.forOwn(new Foo, function(value, key) { console.log(key); }); -// => logs 'a' then 'b' (无法保证遍历的顺序) +// => 输出 'a' 然后 'b' (无法保证遍历的顺序)
diff --git a/forOwnRight.html b/forOwnRight.html index 8377fe7..4c6faec 100644 --- a/forOwnRight.html +++ b/forOwnRight.html @@ -392,16 +392,15 @@
-

forOwnRight source npm

+

forOwnRight source npm

_.forOwnRight(object, [iteratee=_.identity])
-

这个方法类似 _.forOwn except that it iterates over properties of -object in the opposite order.

+

这个方法类似 _.forOwn。 除了它是反方向开始遍历的。

参数

    -
  1. object (Object)

    The object to iterate over.

    +
  2. object (Object)

    要遍历的对象

  3. [iteratee=_.identity] (Function)

    这个函数会处理每一个元素

  4. @@ -420,7 +419,7 @@

    示例

    _.forOwnRight(new Foo, function(value, key) { console.log(key); }); -// => logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b' +// => 输出 'b' 然后 'a', `_.forOwn` 会输出 'a' 然后 'b'
diff --git a/functions.html b/functions.html index fccafd9..aaebf5e 100644 --- a/functions.html +++ b/functions.html @@ -392,20 +392,19 @@
-

functions source npm

+

functions source npm

_.functions(object)
-

Creates an array of function property names from own enumerable properties -of object.

+

返回一个 function 对象自身可枚举属性名的数组。

参数

    -
  1. object (Object)

    The object to inspect.

    +
  2. object (Object)

    要检索的对象

返回值 (Array)

-

Returns the new array of property names.

+

返回包含属性名的新数组

示例

function Foo() {
diff --git a/functionsIn.html b/functionsIn.html
index 048075f..95d0837 100644
--- a/functionsIn.html
+++ b/functionsIn.html
@@ -392,20 +392,19 @@
 
 
-

functionsIn source npm

+

functionsIn source npm

_.functionsIn(object)
-

Creates an array of function property names from own and inherited -enumerable properties of object.

+

返回一个 function 对象自身和继承的可枚举属性名的数组。

参数

    -
  1. object (Object)

    The object to inspect.

    +
  2. object (Object)

    要检索的对象

返回值 (Array)

-

Returns the new array of property names.

+

返回包含属性名的新数组

示例

function Foo() {
diff --git a/get.html b/get.html
index 04d9a99..a5dded9 100644
--- a/get.html
+++ b/get.html
@@ -392,24 +392,24 @@
 
 
-

get source npm

+

get source npm

_.get(object, path, [defaultValue])
-

Gets the value at path of object. If the resolved value is -undefined the defaultValue is used in its place.

+

根据对象路径获取值。 +如果解析 value 是 undefined 会以 defaultValue 取代。

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

  3. -
  4. path (Array|string)

    The path of the property to get.

    +
  5. path (Array|string)

    要获取的对象路径

  6. -
  7. [defaultValue] (*)

    The value returned if the resolved value is undefined.

    +
  8. [defaultValue] (*)

    如果解析值是 undefined,这值会被返回

返回值 (*)

-

Returns the resolved value.

+

返回解析的值

示例

var object = { 'a': [{ 'b': { 'c': 3 } }] };
diff --git a/has.html b/has.html
index 12fbab4..26f513e 100644
--- a/has.html
+++ b/has.html
@@ -392,21 +392,21 @@
 
 
-

has source npm

+

has source npm

_.has(object, path)
-

Checks if path is a direct property of object.

+

检查 path 是否是对象的直接属性。

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

  3. -
  4. path (Array|string)

    The path to check.

    +
  5. path (Array|string)

    要检查的路径

返回值 (boolean)

-

Returns true if path exists否则返回 false

+

如果存在返回 true,否则返回 false

示例

var object = { 'a': { 'b': { 'c': 3 } } };
diff --git a/hasIn.html b/hasIn.html
index 84b63aa..cb3a69f 100644
--- a/hasIn.html
+++ b/hasIn.html
@@ -392,21 +392,21 @@
 
 
-

hasIn source npm

+

hasIn source npm

_.hasIn(object, path)
-

Checks if path is a direct or inherited property of object.

+

检查 path 是否是对象的直接 或者 继承属性。

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

  3. -
  4. path (Array|string)

    The path to check.

    +
  5. path (Array|string)

    要检查的路径

返回值 (boolean)

-

Returns true if path exists否则返回 false

+

如果存在返回 true,否则返回 false

示例

var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
diff --git a/identity.html b/identity.html
index 5d33a18..019758f 100644
--- a/identity.html
+++ b/identity.html
@@ -392,7 +392,7 @@
 
 
-

identity source npm

+

identity source npm

_.identity(value)

This method returns the first argument provided to it.

diff --git a/inRange.html b/inRange.html index c9826eb..495bbf1 100644 --- a/inRange.html +++ b/inRange.html @@ -392,7 +392,7 @@
-

inRange source npm

+

inRange source npm

_.inRange(number, [start=0], end)

检查 n 是否在 startend 之间,但不包括 end。 diff --git a/invert.html b/invert.html index 127002d..c92667a 100644 --- a/invert.html +++ b/invert.html @@ -392,23 +392,23 @@

-

invert source npm

+

invert source npm

_.invert(object, [multiVal])
-

Creates an object composed of the inverted keys and values of object. -If object contains duplicate values, subsequent values overwrite property -assignments of previous values unless multiVal is true.

+

创建一个键值倒置的对象。 +如果 object 有重复的值,后面的值会覆盖前面的值。 +如果 multiVal 为 true,重复的值则组成数组。

参数

    -
  1. object (Object)

    The object to invert.

    +
  2. object (Object)

    要倒置的对象

  3. -
  4. [multiVal] (boolean)

    Allow multiple values per key.

    +
  5. [multiVal] (boolean)

    每个 key 允许多个值

返回值 (Object)

-

Returns the new inverted object.

+

返回新的倒置的对象

示例

var object = { 'a': 1, 'b': 2, 'c': 1 };
@@ -416,7 +416,7 @@ 

示例

_.invert(object); // => { '1': 'c', '2': 'b' } -// with `multiVal` +// 使用 `multiVal` _.invert(object, true); // => { '1': ['a', 'c'], '2': ['b'] }
diff --git a/invoke.html b/invoke.html index 7924958..45a222d 100644 --- a/invoke.html +++ b/invoke.html @@ -392,23 +392,23 @@
-

invoke source npm

+

invoke source npm

_.invoke(object, path, [args])
-

Invokes the method at path of object.

+

调用对象路径的方法

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

  3. -
  4. path (Array|string)

    The path of the method to invoke.

    +
  5. path (Array|string)

    要调用方法的路径

  6. -
  7. [args] (...*)

    The arguments to invoke the method with.

    +
  8. [args] (...*)

    调用方法的参数

返回值 (*)

-

Returns the result of the invoked method.

+

返回调用方法的结果

示例

var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
diff --git a/iteratee.html b/iteratee.html
index 65f9c4b..e16b886 100644
--- a/iteratee.html
+++ b/iteratee.html
@@ -392,7 +392,7 @@
 
 
-

iteratee source npm

+

iteratee source npm

_.iteratee([func=_.identity])

创建一个调用 func 的函数。 with the arguments of the created diff --git a/js/lodash-zh.js b/js/lodash-zh.js index 9bb5afb..f0e3e61 100644 --- a/js/lodash-zh.js +++ b/js/lodash-zh.js @@ -835,7 +835,7 @@ * of key-value pairs for `object` corresponding to the property names of `props`. * * @private - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @param {Array} props The property names to get values for. * @returns {Object} Returns the new array of key-value pairs. */ @@ -878,7 +878,7 @@ * of `props`. * * @private - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @param {Array} props The property names to get values for. * @returns {Object} Returns the array of property values. */ @@ -1000,10 +1000,10 @@ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications // that causes it, under certain circumstances, to provide the same value for // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. + // 了解详情 // // This also ensures a stable sort in V8 and other engines. - // See https://code.google.com/p/v8/issues/detail?id=90 for more details. + // See https://code.google.com/p/v8/issues/detail?id=90 了解详情 return object.index - other.index; } @@ -2185,7 +2185,7 @@ * The base implementation of `_.at` without support for individual paths. * * @private - * @param {Object} object The object to iterate over. + * @param {Object} object 要遍历的对象 * @param {string[]} paths The property paths of elements to pick. * @returns {Array} Returns the new array of picked elements. */ @@ -2522,7 +2522,7 @@ * returning `false`. * * @private - * @param {Object} object The object to iterate over. + * @param {Object} object 要遍历的对象 * @param {Function} iteratee 这个函数会处理每一个元素 * @param {Function} keysFunc The function to get the keys of `object`. * @returns {Object} 返回对象 @@ -2534,7 +2534,7 @@ * in the opposite order. * * @private - * @param {Object} object The object to iterate over. + * @param {Object} object 要遍历的对象 * @param {Function} iteratee 这个函数会处理每一个元素 * @param {Function} keysFunc The function to get the keys of `object`. * @returns {Object} 返回对象 @@ -2545,7 +2545,7 @@ * The base implementation of `_.forIn` without support for callback shorthands. * * @private - * @param {Object} object The object to iterate over. + * @param {Object} object 要遍历的对象 * @param {Function} iteratee 这个函数会处理每一个元素 * @returns {Object} 返回对象 */ @@ -2557,7 +2557,7 @@ * The base implementation of `_.forOwn` without support for callback shorthands. * * @private - * @param {Object} object The object to iterate over. + * @param {Object} object 要遍历的对象 * @param {Function} iteratee 这个函数会处理每一个元素 * @returns {Object} 返回对象 */ @@ -2569,7 +2569,7 @@ * The base implementation of `_.forOwnRight` without support for callback shorthands. * * @private - * @param {Object} object The object to iterate over. + * @param {Object} object 要遍历的对象 * @param {Function} iteratee 这个函数会处理每一个元素 * @returns {Object} 返回对象 */ @@ -2582,7 +2582,7 @@ * `object` function property names filtered from those provided. * * @private - * @param {Object} object The object to inspect. + * @param {Object} object 要检索的对象 * @param {Array} props The property names to filter. * @returns {Array} Returns the new array of filtered property names. */ @@ -2596,7 +2596,7 @@ * The base implementation of `_.get` without support for default values. * * @private - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ @@ -2616,7 +2616,7 @@ * The base implementation of `_.has` without support for deep paths. * * @private - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists否则返回 `false` */ @@ -2632,7 +2632,7 @@ * The base implementation of `_.hasIn` without support for deep paths. * * @private - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists否则返回 `false` */ @@ -2700,7 +2700,7 @@ * * * @private - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @param {Array|string} path The path of the method to invoke. * @param {Array} args The arguments to invoke the method with. * @returns {*} Returns the result of the invoked method. @@ -2750,7 +2750,7 @@ * @param {Object} other The other object to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` 了解详情 * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent否则返回 `false` */ @@ -2814,7 +2814,7 @@ * The base implementation of `_.isMatch` without support for callback shorthands. * * @private - * @param {Object} object The object to inspect. + * @param {Object} object 要检索的对象 * @param {Object} source The object of property values to match. * @param {Array} matchData The property names, values, and compare flags to match. * @param {Function} [customizer] The function to customize comparisons. @@ -2889,7 +2889,7 @@ * * @private * @type Function - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @returns {Array} Returns the array of property names. */ function baseKeys (object) { @@ -2901,7 +2901,7 @@ * property of prototypes or treat sparse arrays as dense. * * @private - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @returns {Array} Returns the array of property names. */ function baseKeysIn (object) { @@ -3290,7 +3290,7 @@ * The base implementation of `_.set`. * * @private - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @param {Function} [customizer] The function to customize path creation. @@ -3992,7 +3992,7 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details. + * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` 了解详情 * @param {*} [thisArg] The `this` binding of `func`. * @returns {Function} Returns the new wrapped function. */ @@ -4052,7 +4052,7 @@ return function () { // Use a `switch` statement to work with class constructors. // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. + // 了解详情 var args = arguments; switch (args.length) { case 0: @@ -4076,7 +4076,7 @@ result = Ctor.apply(thisBinding, args); // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. + // See https://es5.github.io/#x13.2.2 了解详情 return isObject(result) ? result : thisBinding; }; } @@ -4086,7 +4086,7 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details. + * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` 了解详情 * @param {number} arity The arity of `func`. * @returns {Function} Returns the new wrapped function. */ @@ -4180,7 +4180,7 @@ * * @private * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details. + * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` 了解详情 * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to the new function. * @param {Array} [holders] The `partials` placeholder indexes. @@ -4295,7 +4295,7 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details. + * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` 了解详情 * @param {*} thisArg The `this` binding of `func`. * @param {Array} partials The arguments to prepend to those provided to the new function. * @returns {Function} Returns the new wrapped function. @@ -4329,7 +4329,7 @@ * * @private * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details. + * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` 了解详情 * @param {Function} wrapFunc The function to create the `func` wrapper. * @param {*} placeholder The placeholder to replace. * @param {*} [thisArg] The `this` binding of `func`. @@ -4378,7 +4378,7 @@ precision = toInteger(precision); if (precision) { // Shift with exponential notation to avoid floating-point issues. - // See [MDN](https://mdn.io/round#Examples) for more details. + // See [MDN](https://mdn.io/round#Examples) 了解详情 var pair = (toString(number) + 'e').split('e'), value = func(pair[0] + 'e' + (+pair[1] + precision)); @@ -4485,7 +4485,7 @@ * @param {Array} other The other array to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` 了解详情 * @param {Object} [stack] Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent否则返回 `false` */ @@ -4542,7 +4542,7 @@ * @param {string} tag The `toStringTag` of the objects to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` 了解详情 * @returns {boolean} Returns `true` if the objects are equivalent否则返回 `false` */ function equalByTag (object, other, tag, equalFunc, customizer, bitmask) { @@ -4569,7 +4569,7 @@ case regexpTag: case stringTag: // Coerce regexes to strings and treat strings primitives and string - // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + // objects as equal. See https://es5.github.io/#x15.10.6.4 了解详情 return object == (other + ''); case mapTag: @@ -4598,7 +4598,7 @@ * @param {Object} other The other object to compare. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` 了解详情 * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent否则返回 `false` */ @@ -4711,7 +4711,7 @@ * that affects Safari on at least iOS 8.1-8.3 ARM64. * * @private - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @returns {*} Returns the "length" value. */ var getLength = baseProperty('length'); @@ -4720,7 +4720,7 @@ * Gets the property names, values, and compare flags of `object`. * * @private - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @returns {Array} Returns the match data of `object`. */ function getMatchData (object) { @@ -4737,7 +4737,7 @@ * Gets the native function at `key` of `object`. * * @private - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ @@ -4750,7 +4750,7 @@ * Creates an array of the own symbol properties of `object`. * * @private - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @returns {Array} Returns the array of symbols. */ var getSymbols = getOwnPropertySymbols || function () { @@ -4827,7 +4827,7 @@ * Checks if `path` exists on `object`. * * @private - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @param {Array|string} path The path to check. * @param {Function} hasFunc The function to check properties. * @returns {boolean} Returns `true` if `path` exists否则返回 `false` @@ -4936,7 +4936,7 @@ * `arguments` objects, and strings, otherwise `null` is returned. * * @private - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @returns {Array|null} Returns index keys, else `null`. */ function indexKeys (object) { @@ -5139,7 +5139,7 @@ * Gets the parent value at `path` of `object`. * * @private - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @param {Array} path The path to get the parent value of. * @returns {*} Returns the parent value. */ @@ -5175,7 +5175,7 @@ * **注意:** If this function becomes hot, i.e. is invoked a lot in a short * period of time, it will trip its breaker and transition to an identity function * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070) - * for more details. + * 了解详情 * * @private * @param {Function} func The function to associate metadata with. @@ -9566,7 +9566,7 @@ */ function isObject (value) { // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + // See https://code.google.com/p/v8/issues/detail?id=2291 了解详情 var type = typeof value; return !!value && (type == 'object' || type == 'function'); } @@ -10368,15 +10368,14 @@ }); /** - * Creates an array of values corresponding to `paths` of `object`. - * + * 根据 `object` 的路径获取值为数组。 + * * @static * @memberOf _ * @category Object - * @param {Object} object The object to iterate over. - * @param {...(string|string[])} [paths] The property paths of elements to pick, - * specified individually or in arrays. - * @returns {Array} Returns the new array of picked elements. + * @param {Object} object 要遍历的对象 + * @param {...(string|string[])} [paths] 要获取的对象的元素路径,单独指定或者指定在数组中 + * @returns {Array} 返回选中值的数组 * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; @@ -10392,15 +10391,15 @@ }); /** - * Creates an object that inherits from the `prototype` object. If a `properties` - * object is provided its own enumerable properties are assigned to the created object. - * + * 创建一个继承 `prototype` 的对象。 + * 如果提供了 `properties`,它的可枚举属性会被分配到创建的对象上。 + * * @static * @memberOf _ * @category Object - * @param {Object} prototype The object to inherit from. - * @param {Object} [properties] The properties to assign to the object. - * @returns {Object} Returns the new object. + * @param {Object} prototype 要继承的对象 + * @param {Object} [properties] 待分配的属性 + * @returns {Object} 返回新对象 * @example * * function Shape() { @@ -10429,10 +10428,9 @@ } /** - * Assigns own and inherited enumerable properties of source objects to the - * destination object for all destination properties that resolve to `undefined`. - * Source objects are applied from left to right. Once a property is set, - * additional values of the same property are ignored. + * 分配来源对象的可枚举属性到目标对象所有解析为 `undefined` 的属性上。 + * 来源对象从左到右应用。 + * 一旦设置了相同属性的值,后续的将被忽略掉。 * * **注意:** 这方法会改变源对象 * @@ -10453,8 +10451,7 @@ }); /** - * 这个方法类似 `_.defaults` except that it recursively assigns - * default properties. + * 这个方法类似 `_.defaults`,除了它会递归分配默认属性。 * * **注意:** 这方法会改变源对象 * @@ -10476,15 +10473,16 @@ }); /** - * 这个方法类似 `_.find` except that it returns the key of the first - * element `predicate` returns truthy for instead of the element itself. + * 这个方法类似 `_.find`。 + * 除了它返回最先被 `predicate` 判断为真值的元素 key,而不是元素本身。 * * @static * @memberOf _ * @category Object - * @param {Object} object The object to search. + * @param {Object} object 需要检索的对象 * @param {Function|Object|string} [predicate=_.identity] 这个函数会处理每一个元素 - * @returns {string|undefined} Returns the key of the matched element, else `undefined`. + * @returns {string|undefined} 返回匹配的 key,否则返回 `undefined`。 + * * @example * * var users = { @@ -10513,15 +10511,15 @@ } /** - * 这个方法类似 `_.findKey` except that it iterates over elements of - * a collection in the opposite order. + * 这个方法类似 `_.findKey`。 + * 不过它是反方向开始遍历的。 * * @static * @memberOf _ * @category Object - * @param {Object} object The object to search. + * @param {Object} object 需要检索的对象 * @param {Function|Object|string} [predicate=_.identity] 这个函数会处理每一个元素 - * @returns {string|undefined} Returns the key of the matched element, else `undefined`. + * @returns {string|undefined} 返回匹配的 key,否则返回 `undefined`。 * @example * * var users = { @@ -10531,7 +10529,7 @@ * }; * * _.findLastKey(users, function(o) { return o.age < 40; }); - * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * // => 返回 'pebbles', `_.findKey` 会返回 'barney' * * // 使用了 `_.matches` 的回调结果 * _.findLastKey(users, { 'age': 36, 'active': true }); @@ -10550,15 +10548,14 @@ } /** - * Iterates over own and inherited enumerable properties of an object invoking - * `iteratee` for each property. The iteratee is invoked with three arguments: - * (value, key, object). Iteratee functions may exit iteration early by explicitly - * returning `false`. + * 使用 `iteratee` 遍历对象的自身和继承的可枚举属性。 + * iteratee 会传入3个参数:(value, key, object)。 + * 如果返回 false,iteratee 会提前退出遍历。 * * @static * @memberOf _ * @category Object - * @param {Object} object The object to iterate over. + * @param {Object} object 要遍历的对象 * @param {Function} [iteratee=_.identity] 这个函数会处理每一个元素 * @returns {Object} 返回对象 * @example @@ -10573,20 +10570,20 @@ * _.forIn(new Foo, function(value, key) { * console.log(key); * }); - * // => logs 'a', 'b', then 'c' (无法保证遍历的顺序) + * // => 输出 'a', 'b', 然后 'c' (无法保证遍历的顺序) */ function forIn (object, iteratee) { return object == null ? object : baseFor(object, toFunction(iteratee), keysIn); } /** - * 这个方法类似 `_.forIn` except that it iterates over properties of - * `object` in the opposite order. + * 这个方法类似 `_.forIn`。 + * 除了它是反方向开始遍历的。 * * @static * @memberOf _ * @category Object - * @param {Object} object The object to iterate over. + * @param {Object} object 要遍历的对象 * @param {Function} [iteratee=_.identity] 这个函数会处理每一个元素 * @returns {Object} 返回对象 * @example @@ -10601,22 +10598,20 @@ * _.forInRight(new Foo, function(value, key) { * console.log(key); * }); - * // => logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c' + * // => 输出 'c', 'b', 然后 'a', `_.forIn` 会输出 'a', 'b', 然后 'c' */ function forInRight (object, iteratee) { return object == null ? object : baseForRight(object, toFunction(iteratee), keysIn); } /** - * Iterates over own enumerable properties of an object invoking `iteratee` - * for each property. The iteratee is invoked with three arguments: - * (value, key, object). Iteratee functions may exit iteration early by - * explicitly returning `false`. + * 使用 `iteratee` 遍历自身的可枚举属性。 + * iteratee 会传入3个参数:(value, key, object)。 如果返回 false,iteratee 会提前退出遍历。 * * @static * @memberOf _ * @category Object - * @param {Object} object The object to iterate over. + * @param {Object} object 要遍历的对象 * @param {Function} [iteratee=_.identity] 这个函数会处理每一个元素 * @returns {Object} 返回对象 * @example @@ -10631,20 +10626,19 @@ * _.forOwn(new Foo, function(value, key) { * console.log(key); * }); - * // => logs 'a' then 'b' (无法保证遍历的顺序) + * // => 输出 'a' 然后 'b' (无法保证遍历的顺序) */ function forOwn (object, iteratee) { return object && baseForOwn(object, toFunction(iteratee)); } /** - * 这个方法类似 `_.forOwn` except that it iterates over properties of - * `object` in the opposite order. + * 这个方法类似 `_.forOwn`。 除了它是反方向开始遍历的。 * * @static * @memberOf _ * @category Object - * @param {Object} object The object to iterate over. + * @param {Object} object 要遍历的对象 * @param {Function} [iteratee=_.identity] 这个函数会处理每一个元素 * @returns {Object} 返回对象 * @example @@ -10659,21 +10653,20 @@ * _.forOwnRight(new Foo, function(value, key) { * console.log(key); * }); - * // => logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b' + * // => 输出 'b' 然后 'a', `_.forOwn` 会输出 'a' 然后 'b' */ function forOwnRight (object, iteratee) { return object && baseForOwnRight(object, toFunction(iteratee)); } /** - * Creates an array of function property names from own enumerable properties - * of `object`. + * 返回一个 function 对象自身可枚举属性名的数组。 * * @static * @memberOf _ * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. + * @param {Object} object 要检索的对象 + * @returns {Array} 返回包含属性名的新数组 * @example * * function Foo() { @@ -10691,14 +10684,13 @@ } /** - * Creates an array of function property names from own and inherited - * enumerable properties of `object`. + * 返回一个 function 对象自身和继承的可枚举属性名的数组。 * * @static * @memberOf _ * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. + * @param {Object} object 要检索的对象 + * @returns {Array} 返回包含属性名的新数组 * @example * * function Foo() { @@ -10716,16 +10708,16 @@ } /** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined` the `defaultValue` is used in its place. + * 根据对象路径获取值。 + * 如果解析 value 是 `undefined` 会以 `defaultValue` 取代。 * * @static * @memberOf _ * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. - * @returns {*} Returns the resolved value. + * @param {Object} object 要检索的对象 + * @param {Array|string} path 要获取的对象路径 + * @param {*} [defaultValue] 如果解析值是 `undefined`,这值会被返回 + * @returns {*} 返回解析的值 * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; @@ -10745,14 +10737,14 @@ } /** - * Checks if `path` is a direct property of `object`. + * 检查 `path` 是否是对象的直接属性。 * * @static * @memberOf _ * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists否则返回 `false` + * @param {Object} object 要检索的对象 + * @param {Array|string} path 要检查的路径 + * @returns {boolean} 如果存在返回 true,否则返回 `false` * @example * * var object = { 'a': { 'b': { 'c': 3 } } }; @@ -10775,14 +10767,14 @@ } /** - * Checks if `path` is a direct or inherited property of `object`. + * 检查 `path` 是否是对象的直接 或者 继承属性。 * * @static * @memberOf _ * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists否则返回 `false` + * @param {Object} object 要检索的对象 + * @param {Array|string} path 要检查的路径 + * @returns {boolean} 如果存在返回 true,否则返回 `false` * @example * * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); @@ -10804,17 +10796,17 @@ } /** - * Creates an object composed of the inverted keys and values of `object`. - * If `object` contains duplicate values, subsequent values overwrite property - * assignments of previous values unless `multiVal` is `true`. + * 创建一个键值倒置的对象。 + * 如果 `object` 有重复的值,后面的值会覆盖前面的值。 + * 如果 `multiVal` 为 true,重复的值则组成数组。 * * @static * @memberOf _ * @category Object - * @param {Object} object The object to invert. - * @param {boolean} [multiVal] Allow multiple values per key. + * @param {Object} object 要倒置的对象 + * @param {boolean} [multiVal] 每个 key 允许多个值 * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`. - * @returns {Object} Returns the new inverted object. + * @returns {Object} 返回新的倒置的对象 * @example * * var object = { 'a': 1, 'b': 2, 'c': 1 }; @@ -10822,7 +10814,7 @@ * _.invert(object); * // => { '1': 'c', '2': 'b' } * - * // with `multiVal` + * // 使用 `multiVal` * _.invert(object, true); * // => { '1': ['a', 'c'], '2': ['b'] } */ @@ -10844,15 +10836,15 @@ } /** - * Invokes the method at `path` of `object`. + * 调用对象路径的方法 * * @static * @memberOf _ * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {...*} [args] The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. + * @param {Object} object 要检索的对象 + * @param {Array|string} path 要调用方法的路径 + * @param {...*} [args] 调用方法的参数 + * @returns {*} 返回调用方法的结果 * @example * * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; @@ -10863,17 +10855,17 @@ var invoke = rest(baseInvoke); /** - * Creates an array of the own enumerable property names of `object`. + * 创建 `object` 自身可枚举属性名为一个数组。 * - * **注意:** Non-object values are coerced to objects. See the + * **注意:** 非对象的值会被强制转换为对象,查看 * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) - * for more details. + * 了解详情 * * @static * @memberOf _ * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. + * @param {Object} object 要检索的对象 + * @returns {Array} 返回包含属性名的数组 * @example * * function Foo() { @@ -10908,15 +10900,15 @@ } /** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **注意:** Non-object values are coerced to objects. + * 创建 `object` 自身 或 继承的可枚举属性名为一个数组。 + * + * **注意:** 非对象的值会被强制转换为对象 * * @static * @memberOf _ * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. + * @param {Object} object 要检索的对象 + * @returns {Array} 返回包含属性名的数组 * @example * * function Foo() { @@ -10949,16 +10941,15 @@ } /** - * The opposite of `_.mapValues`; this method creates an object with the - * same values as `object` and keys generated by running each own enumerable - * property of `object` through `iteratee`. + * 反向版 `_.mapValues`。 + * 这个方法创建一个对象,对象的值与源对象相同,但 key 是通过 `iteratee` 产生的。 * * @static * @memberOf _ * @category Object - * @param {Object} object The object to iterate over. + * @param {Object} object 要遍历的对象 * @param {Function|Object|string} [iteratee=_.identity] 这个函数会处理每一个元素 - * @returns {Object} Returns the new mapped object. + * @returns {Object} 返回映射后的新对象 * @example * * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { @@ -10977,16 +10968,15 @@ } /** - * Creates an object with the same keys as `object` and values generated by - * running each own enumerable property of `object` through `iteratee`. The - * iteratee function is invoked with three arguments: (value, key, object). + * 创建一个对象,对象的key相同,值是通过 `iteratee` 产生的。 + * iteratee 会传入3个参数: (value, key, object) * * @static * @memberOf _ * @category Object - * @param {Object} object The object to iterate over. + * @param {Object} object 要遍历的对象 * @param {Function|Object|string} [iteratee=_.identity] 这个函数会处理每一个元素 - * @returns {Object} Returns the new mapped object. + * @returns {Object} 返回映射后的对象 * @example * * var users = { @@ -11184,7 +11174,7 @@ * @static * @memberOf _ * @category Object - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @param {Array|string} path The path of the property to resolve. * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. * @returns {*} Returns the resolved value. @@ -11277,7 +11267,7 @@ * @static * @memberOf _ * @category Object - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @returns {Array} Returns the new array of key-value pairs. * @example * @@ -11301,7 +11291,7 @@ * @static * @memberOf _ * @category Object - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @returns {Array} Returns the new array of key-value pairs. * @example * @@ -11330,7 +11320,7 @@ * @static * @memberOf _ * @category Object - * @param {Array|Object} object The object to iterate over. + * @param {Array|Object} object 要遍历的对象 * @param {Function} [iteratee=_.identity] 这个函数会处理每一个元素 * @param {*} [accumulator] The custom accumulator value. * @returns {*} Returns the accumulated value. @@ -11405,7 +11395,7 @@ * @static * @memberOf _ * @category Object - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @returns {Array} Returns the array of property values. * @example * @@ -11434,7 +11424,7 @@ * @static * @memberOf _ * @category Object - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @returns {Array} Returns the array of property values. * @example * @@ -11715,13 +11705,13 @@ * ">" and "/" don't need escaping in HTML and have no special meaning * unless they're part of a tag or unquoted attribute value. * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) - * (under "semi-related fun fact") for more details. + * (under "semi-related fun fact") 了解详情 * * Backticks are escaped because in IE < 9, they can break out of * attribute values or HTML comments. See [#59](https://html5sec.org/#59), * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/) - * for more details. + * 了解详情 * * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping) * to reduce XSS vectors. @@ -11962,7 +11952,7 @@ */ function parseInt (string, radix, guard) { // Chrome fails to trim leading whitespace characters. - // See https://code.google.com/p/v8/issues/detail?id=3109 for more details. + // See https://code.google.com/p/v8/issues/detail?id=3109 了解详情 if (guard || radix == null) { radix = 0; } else if (radix) { @@ -12001,7 +11991,7 @@ return result; } // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring 了解详情 do { if (n % 2) { result += string; @@ -13005,7 +12995,7 @@ * @static * @memberOf _ * @category Utility - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @param {...*} [args] The arguments to invoke the method with. * @returns {Function} Returns the new function. * @example @@ -13251,7 +13241,7 @@ * @static * @memberOf _ * @category Utility - * @param {Object} object The object to query. + * @param {Object} object 要检索的对象 * @returns {Function} Returns the new function. * @example * @@ -14294,7 +14284,7 @@ // Expose lodash on the free variable `window` or `self` when available. This // prevents errors in cases where lodash is loaded by a script tag in the presence - // of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch for more details. + // of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch 了解详情 (freeWindow || freeSelf || {})._ = _; // Some AMD build optimizers like r.js check for condition patterns like the following: diff --git a/kebabCase.html b/kebabCase.html index 27bd7d8..6e3ec93 100644 --- a/kebabCase.html +++ b/kebabCase.html @@ -392,7 +392,7 @@

-

kebabCase source npm

+

kebabCase source npm

_.kebabCase([string=''])

Converts string to kebab case.

diff --git a/keys.html b/keys.html index 3332825..f26c1c4 100644 --- a/keys.html +++ b/keys.html @@ -392,24 +392,24 @@
-

keys source npm

+

keys source npm

_.keys(object)
-

Creates an array of the own enumerable property names of object. +

创建 object 自身可枚举属性名为一个数组。

-注意: Non-object values are coerced to objects. See the +注意: 非对象的值会被强制转换为对象,查看 ES spec -for more details.

+了解详情

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

返回值 (Array)

-

Returns the array of property names.

+

返回包含属性名的数组

示例

function Foo() {
diff --git a/keysIn.html b/keysIn.html
index 973ee60..498de2a 100644
--- a/keysIn.html
+++ b/keysIn.html
@@ -392,22 +392,22 @@
 
 
-

keysIn source npm

+

keysIn source npm

_.keysIn(object)
-

Creates an array of the own and inherited enumerable property names of object. +

创建 object 自身 或 继承的可枚举属性名为一个数组。

-注意: Non-object values are coerced to objects.

+注意: 非对象的值会被强制转换为对象

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

返回值 (Array)

-

Returns the array of property names.

+

返回包含属性名的数组

示例

function Foo() {
diff --git a/lowerCase.html b/lowerCase.html
index 53fca4d..97a2636 100644
--- a/lowerCase.html
+++ b/lowerCase.html
@@ -392,7 +392,7 @@
 
 
-

lowerCase source npm

+

lowerCase source npm

_.lowerCase([string=''])

Converts string, as space separated words, to lower case.

diff --git a/lowerFirst.html b/lowerFirst.html index 414c829..ef24631 100644 --- a/lowerFirst.html +++ b/lowerFirst.html @@ -392,7 +392,7 @@
-

lowerFirst source npm

+

lowerFirst source npm

_.lowerFirst([string=''])

Converts the first character of string to lower case.

diff --git a/mapKeys.html b/mapKeys.html index 975eefa..eb5ee0b 100644 --- a/mapKeys.html +++ b/mapKeys.html @@ -392,23 +392,22 @@
-

mapKeys source npm

+

mapKeys source npm

_.mapKeys(object, [iteratee=_.identity])
-

The opposite of _.mapValues; this method creates an object with the -same values as object and keys generated by running each own enumerable -property of object through iteratee.

+

反向版 _.mapValues。 +这个方法创建一个对象,对象的值与源对象相同,但 key 是通过 iteratee 产生的。

参数

    -
  1. object (Object)

    The object to iterate over.

    +
  2. object (Object)

    要遍历的对象

  3. [iteratee=_.identity] (Function|Object|string)

    这个函数会处理每一个元素

返回值 (Object)

-

Returns the new mapped object.

+

返回映射后的新对象

示例

_.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
diff --git a/mapValues.html b/mapValues.html
index 20ad5e7..4f6bdab 100644
--- a/mapValues.html
+++ b/mapValues.html
@@ -392,23 +392,22 @@
 
 
-

mapValues source npm

+

mapValues source npm

_.mapValues(object, [iteratee=_.identity])
-

Creates an object with the same keys as object and values generated by -running each own enumerable property of object through iteratee. The -iteratee function is invoked with three arguments: (value, key, object).

+

创建一个对象,对象的key相同,值是通过 iteratee 产生的。 +iteratee 会传入3个参数: (value, key, object)

参数

    -
  1. object (Object)

    The object to iterate over.

    +
  2. object (Object)

    要遍历的对象

  3. [iteratee=_.identity] (Function|Object|string)

    这个函数会处理每一个元素

返回值 (Object)

-

Returns the new mapped object.

+

返回映射后的对象

示例

var users = {
diff --git a/matches.html b/matches.html
index cffdab6..203b931 100644
--- a/matches.html
+++ b/matches.html
@@ -392,7 +392,7 @@
 
 
-

matches source npm

+

matches source npm

_.matches(source)

Creates a function that performs a deep partial comparison between a given diff --git a/matchesProperty.html b/matchesProperty.html index ecddafd..5334360 100644 --- a/matchesProperty.html +++ b/matchesProperty.html @@ -392,7 +392,7 @@

-

matchesProperty source npm

+

matchesProperty source npm

_.matchesProperty(path, srcValue)

Creates a function that performs a deep partial comparison between the diff --git a/max.html b/max.html index 3756695..6871f30 100644 --- a/max.html +++ b/max.html @@ -392,7 +392,7 @@

-

max source npm

+

max source npm

_.max(array)

计算 array 中最大的值。 diff --git a/maxBy.html b/maxBy.html index dc992d6..7cb819b 100644 --- a/maxBy.html +++ b/maxBy.html @@ -392,7 +392,7 @@

-

maxBy source npm

+

maxBy source npm

_.maxBy(array, [iteratee=_.identity])

这个方法类似 _.max diff --git a/mean.html b/mean.html index a0830e1..92bb8bb 100644 --- a/mean.html +++ b/mean.html @@ -392,7 +392,7 @@

-

mean source npm

+

mean source npm

_.mean(array)

计算 array 的平均值。

diff --git a/merge.html b/merge.html index 090ccf0..6af4e69 100644 --- a/merge.html +++ b/merge.html @@ -392,7 +392,7 @@
-

merge source npm

+

merge source npm

_.merge(object, [sources])

Recursively merges own and inherited enumerable properties of source diff --git a/mergeWith.html b/mergeWith.html index 5956f92..2e88cad 100644 --- a/mergeWith.html +++ b/mergeWith.html @@ -392,7 +392,7 @@

-

mergeWith source npm

+

mergeWith source npm

_.mergeWith(object, sources, customizer)

这个方法类似 _.merge except that it accepts customizer which diff --git a/method.html b/method.html index f81b434..e8b5722 100644 --- a/method.html +++ b/method.html @@ -392,7 +392,7 @@

-

method source npm

+

method source npm

_.method(path, [args])

Creates a function that invokes the method at path of a given object. diff --git a/methodOf.html b/methodOf.html index eea534a..6f70fa4 100644 --- a/methodOf.html +++ b/methodOf.html @@ -392,7 +392,7 @@

-

methodOf source npm

+

methodOf source npm

_.methodOf(object, [args])

The opposite of _.method; this method creates a function that invokes @@ -402,7 +402,7 @@

参数

    -
  1. object (Object)

    The object to query.

    +
  2. object (Object)

    要检索的对象

  3. [args] (...*)

    The arguments to invoke the method with.

  4. diff --git a/min.html b/min.html index ae00282..9c46923 100644 --- a/min.html +++ b/min.html @@ -392,7 +392,7 @@
    -

    min source npm

    +

    min source npm

    _.min(array)

    计算 array 中最小的值。 如果 array 是 空的或者假值将会返回 undefined。

    diff --git a/minBy.html b/minBy.html index e8e3e42..5dbbe78 100644 --- a/minBy.html +++ b/minBy.html @@ -392,7 +392,7 @@
    -

    minBy source npm

    +

    minBy source npm

    _.minBy(array, [iteratee=_.identity])

    这个方法类似 _.min。 diff --git a/mixin.html b/mixin.html index f2fe24e..b472eb3 100644 --- a/mixin.html +++ b/mixin.html @@ -392,7 +392,7 @@

    -

    mixin source npm

    +

    mixin source npm

    _.mixin([object=lodash], source, [options])

    Adds all own enumerable function properties of a source object to the diff --git a/noConflict.html b/noConflict.html index e64affa..4c8dbb2 100644 --- a/noConflict.html +++ b/noConflict.html @@ -392,7 +392,7 @@

    -

    noConflict source npm

    +

    noConflict source npm

    _.noConflict()

    Reverts the _ variable to its previous value and returns a reference to diff --git a/noop.html b/noop.html index 936fdcd..4c2af4f 100644 --- a/noop.html +++ b/noop.html @@ -392,7 +392,7 @@

    -

    noop source npm

    +

    noop source npm

    _.noop()

    A no-operation function that returns undefined regardless of the diff --git a/nthArg.html b/nthArg.html index 09cf5e5..ed47faa 100644 --- a/nthArg.html +++ b/nthArg.html @@ -392,7 +392,7 @@

    -

    nthArg source npm

    +

    nthArg source npm

    _.nthArg([n=0])

    Creates a function that returns its nth argument.

    diff --git a/omit.html b/omit.html index 7bcc215..9aac7bf 100644 --- a/omit.html +++ b/omit.html @@ -392,7 +392,7 @@
    -

    omit source npm

    +

    omit source npm

    _.omit(object, [props])

    The opposite of _.pick; this method creates an object composed of the diff --git a/omitBy.html b/omitBy.html index 212bef4..dd66ef0 100644 --- a/omitBy.html +++ b/omitBy.html @@ -392,7 +392,7 @@

    -

    omitBy source npm

    +

    omitBy source npm

    _.omitBy(object, [predicate=_.identity])

    The opposite of _.pickBy; this method creates an object composed of the diff --git a/over.html b/over.html index b118120..733464b 100644 --- a/over.html +++ b/over.html @@ -392,7 +392,7 @@

    -

    over source npm

    +

    over source npm

    _.over(iteratees)

    Creates a function that invokes iteratees with the arguments provided diff --git a/overEvery.html b/overEvery.html index 3fbef30..cb4ebd3 100644 --- a/overEvery.html +++ b/overEvery.html @@ -392,7 +392,7 @@

    -

    overEvery source npm

    +

    overEvery source npm

    _.overEvery(predicates)

    Creates a function that checks if all of the predicates return diff --git a/overSome.html b/overSome.html index 883f986..a94eb2b 100644 --- a/overSome.html +++ b/overSome.html @@ -392,7 +392,7 @@

    -

    overSome source npm

    +

    overSome source npm

    _.overSome(predicates)

    Creates a function that checks if any of the predicates return diff --git a/pad.html b/pad.html index 642e1ea..4008a5b 100644 --- a/pad.html +++ b/pad.html @@ -392,7 +392,7 @@

    -

    pad source npm

    +

    pad source npm

    _.pad([string=''], [length=0], [chars=' '])

    Pads string on the left and right sides if it's shorter than length. diff --git a/padEnd.html b/padEnd.html index 98af505..9812f1a 100644 --- a/padEnd.html +++ b/padEnd.html @@ -392,7 +392,7 @@

    -

    padEnd source npm

    +

    padEnd source npm

    _.padEnd([string=''], [length=0], [chars=' '])

    Pads string on the right side if it's shorter than length. Padding diff --git a/padStart.html b/padStart.html index f4123b8..dd020e7 100644 --- a/padStart.html +++ b/padStart.html @@ -392,7 +392,7 @@

    -

    padStart source npm

    +

    padStart source npm

    _.padStart([string=''], [length=0], [chars=' '])

    Pads string on the left side if it's shorter than length. Padding diff --git a/pages.json b/pages.json index 2d8c94c..c72173c 100644 --- a/pages.json +++ b/pages.json @@ -339,39 +339,39 @@ ,{ "href":"/toString", "html":"

    toString source npm

    \n
    _.toString(value)
    \n\n

    如果 value 不是字符串,将其转换为字符串。\nnullundefined 将返回空字符串。

    \n
    \n\n

    参数

    \n
      \n
    1. value (*)

      要转换的值

      \n
    2. \n
    \n

    返回值 (string)

    \n

    返回字符串

    \n
    \n

    示例

    \n
    _.toString(null);\n// => ''\n\n_.toString(-0);\n// => '-0'\n\n_.toString([1, 2, 3]);\n// => '1,2,3'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/add", - "html":"

    add source npm

    \n
    _.add(augend, addend)
    \n\n

    相加两个数

    \n
    \n\n

    参数

    \n
      \n
    1. augend (number)

      相加的第一个数

      \n
    2. \n
    3. addend (number)

      相加的第二个数

      \n
    4. \n
    \n

    返回值 (number)

    \n

    返回总和

    \n
    \n

    示例

    \n
    _.add(6, 4);\n// => 10\n
    \n
    \n
    \n\n
    " } + "html":"

    add source npm

    \n
    _.add(augend, addend)
    \n\n

    相加两个数

    \n
    \n\n

    参数

    \n
      \n
    1. augend (number)

      相加的第一个数

      \n
    2. \n
    3. addend (number)

      相加的第二个数

      \n
    4. \n
    \n

    返回值 (number)

    \n

    返回总和

    \n
    \n

    示例

    \n
    _.add(6, 4);\n// => 10\n
    \n
    \n
    \n\n
    " } ,{ "href":"/ceil", - "html":"

    ceil source npm

    \n
    _.ceil(number, [precision=0])
    \n\n

    根据 precision 向上舍入 number

    \n
    \n\n

    参数

    \n
      \n
    1. number (number)

      要向上舍入的值

      \n
    2. \n
    3. [precision=0] (number)

      精度

      \n
    4. \n
    \n

    返回值 (number)

    \n

    返回向上舍入的结果

    \n
    \n

    示例

    \n
    _.ceil(4.006);\n// => 5\n\n_.ceil(6.004, 2);\n// => 6.01\n\n_.ceil(6040, -2);\n// => 6100\n
    \n
    \n
    \n\n
    " } + "html":"

    ceil source npm

    \n
    _.ceil(number, [precision=0])
    \n\n

    根据 precision 向上舍入 number

    \n
    \n\n

    参数

    \n
      \n
    1. number (number)

      要向上舍入的值

      \n
    2. \n
    3. [precision=0] (number)

      精度

      \n
    4. \n
    \n

    返回值 (number)

    \n

    返回向上舍入的结果

    \n
    \n

    示例

    \n
    _.ceil(4.006);\n// => 5\n\n_.ceil(6.004, 2);\n// => 6.01\n\n_.ceil(6040, -2);\n// => 6100\n
    \n
    \n
    \n\n
    " } ,{ "href":"/floor", - "html":"

    floor source npm

    \n
    _.floor(number, [precision=0])
    \n\n

    根据 precision 向下保留 number

    \n
    \n\n

    参数

    \n
      \n
    1. number (number)

      要向下保留的数

      \n
    2. \n
    3. [precision=0] (number)

      精度

      \n
    4. \n
    \n

    返回值 (number)

    \n

    返回向下保留的结果

    \n
    \n

    示例

    \n
    _.floor(4.006);\n// => 4\n\n_.floor(0.046, 2);\n// => 0.04\n\n_.floor(4060, -2);\n// => 4000\n
    \n
    \n
    \n\n
    " } + "html":"

    floor source npm

    \n
    _.floor(number, [precision=0])
    \n\n

    根据 precision 向下保留 number

    \n
    \n\n

    参数

    \n
      \n
    1. number (number)

      要向下保留的数

      \n
    2. \n
    3. [precision=0] (number)

      精度

      \n
    4. \n
    \n

    返回值 (number)

    \n

    返回向下保留的结果

    \n
    \n

    示例

    \n
    _.floor(4.006);\n// => 4\n\n_.floor(0.046, 2);\n// => 0.04\n\n_.floor(4060, -2);\n// => 4000\n
    \n
    \n
    \n\n
    " } ,{ "href":"/max", - "html":"

    max source npm

    \n
    _.max(array)
    \n\n

    计算 array 中最大的值。\n如果 array 是 空的或者假值将会返回 undefined。

    \n
    \n\n

    参数

    \n
      \n
    1. array (Array)

      要计算的数组

      \n
    2. \n
    \n

    返回值 (*)

    \n

    返回最大的值

    \n
    \n

    示例

    \n
    _.max([4, 2, 8, 6]);\n// => 8\n\n_.max([]);\n// => undefined\n
    \n
    \n
    \n\n
    " } + "html":"

    max source npm

    \n
    _.max(array)
    \n\n

    计算 array 中最大的值。\n如果 array 是 空的或者假值将会返回 undefined。

    \n
    \n\n

    参数

    \n
      \n
    1. array (Array)

      要计算的数组

      \n
    2. \n
    \n

    返回值 (*)

    \n

    返回最大的值

    \n
    \n

    示例

    \n
    _.max([4, 2, 8, 6]);\n// => 8\n\n_.max([]);\n// => undefined\n
    \n
    \n
    \n\n
    " } ,{ "href":"/maxBy", - "html":"

    maxBy source npm

    \n
    _.maxBy(array, [iteratee=_.identity])
    \n\n

    这个方法类似 _.max \n除了它接受 iteratee 调用每一个元素,根据返回的 value 决定排序准则。 \niteratee 会传入1个参数:(value)。

    \n
    \n\n

    参数

    \n
      \n
    1. array (Array)

      要遍历的数组

      \n
    2. \n
    3. [iteratee=_.identity] (Function|Object|string)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (*)

    \n

    返回最大值

    \n
    \n

    示例

    \n
    var users = [\n  { 'user': 'barney', 'age': 36 },\n  { 'user': 'fred',   'age': 40 }\n];\n\n_.maxBy(users, function(o) { return o.age; });\n// => { 'user': 'fred', 'age': 40 }\n\n// 使用了 `_.property` 的回调结果\n_.maxBy(users, 'age');\n// => { 'user': 'fred', 'age': 40 }\n
    \n
    \n
    \n\n
    " } + "html":"

    maxBy source npm

    \n
    _.maxBy(array, [iteratee=_.identity])
    \n\n

    这个方法类似 _.max \n除了它接受 iteratee 调用每一个元素,根据返回的 value 决定排序准则。 \niteratee 会传入1个参数:(value)。

    \n
    \n\n

    参数

    \n
      \n
    1. array (Array)

      要遍历的数组

      \n
    2. \n
    3. [iteratee=_.identity] (Function|Object|string)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (*)

    \n

    返回最大值

    \n
    \n

    示例

    \n
    var users = [\n  { 'user': 'barney', 'age': 36 },\n  { 'user': 'fred',   'age': 40 }\n];\n\n_.maxBy(users, function(o) { return o.age; });\n// => { 'user': 'fred', 'age': 40 }\n\n// 使用了 `_.property` 的回调结果\n_.maxBy(users, 'age');\n// => { 'user': 'fred', 'age': 40 }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/mean", - "html":"

    mean source npm

    \n
    _.mean(array)
    \n\n

    计算 array 的平均值。

    \n
    \n\n

    参数

    \n
      \n
    1. array (Array)

      要遍历的数组

      \n
    2. \n
    \n

    返回值 (number)

    \n

    返回平均值

    \n
    \n

    示例

    \n
    _.mean([4, 2, 8, 6]);\n// => 5\n
    \n
    \n
    \n\n
    " } + "html":"

    mean source npm

    \n
    _.mean(array)
    \n\n

    计算 array 的平均值。

    \n
    \n\n

    参数

    \n
      \n
    1. array (Array)

      要遍历的数组

      \n
    2. \n
    \n

    返回值 (number)

    \n

    返回平均值

    \n
    \n

    示例

    \n
    _.mean([4, 2, 8, 6]);\n// => 5\n
    \n
    \n
    \n\n
    " } ,{ "href":"/min", - "html":"

    min source npm

    \n
    _.min(array)
    \n\n

    计算 array 中最小的值。 如果 array 是 空的或者假值将会返回 undefined。

    \n
    \n\n

    参数

    \n
      \n
    1. array (Array)

      要计算的数组

      \n
    2. \n
    \n

    返回值 (*)

    \n

    返回最小值

    \n
    \n

    示例

    \n
    _.min([4, 2, 8, 6]);\n// => 2\n\n_.min([]);\n// => undefined\n
    \n
    \n
    \n\n
    " } + "html":"

    min source npm

    \n
    _.min(array)
    \n\n

    计算 array 中最小的值。 如果 array 是 空的或者假值将会返回 undefined。

    \n
    \n\n

    参数

    \n
      \n
    1. array (Array)

      要计算的数组

      \n
    2. \n
    \n

    返回值 (*)

    \n

    返回最小值

    \n
    \n

    示例

    \n
    _.min([4, 2, 8, 6]);\n// => 2\n\n_.min([]);\n// => undefined\n
    \n
    \n
    \n\n
    " } ,{ "href":"/minBy", - "html":"

    minBy source npm

    \n
    _.minBy(array, [iteratee=_.identity])
    \n\n

    这个方法类似 _.min。\n除了它接受 iteratee 调用每一个元素,根据返回的 value 决定排序准则。 iteratee 会传入1个参数:(value)。

    \n
    \n\n

    参数

    \n
      \n
    1. array (Array)

      要遍历的数组

      \n
    2. \n
    3. [iteratee=_.identity] (Function|Object|string)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (*)

    \n

    返回最小值

    \n
    \n

    示例

    \n
    var users = [\n  { 'user': 'barney', 'age': 36 },\n  { 'user': 'fred',   'age': 40 }\n];\n\n_.minBy(users, function(o) { return o.age; });\n// => { 'user': 'barney', 'age': 36 }\n\n// 使用了 `_.property` 的回调结果\n_.minBy(users, 'age');\n// => { 'user': 'barney', 'age': 36 }\n
    \n
    \n
    \n\n
    " } + "html":"

    minBy source npm

    \n
    _.minBy(array, [iteratee=_.identity])
    \n\n

    这个方法类似 _.min。\n除了它接受 iteratee 调用每一个元素,根据返回的 value 决定排序准则。 iteratee 会传入1个参数:(value)。

    \n
    \n\n

    参数

    \n
      \n
    1. array (Array)

      要遍历的数组

      \n
    2. \n
    3. [iteratee=_.identity] (Function|Object|string)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (*)

    \n

    返回最小值

    \n
    \n

    示例

    \n
    var users = [\n  { 'user': 'barney', 'age': 36 },\n  { 'user': 'fred',   'age': 40 }\n];\n\n_.minBy(users, function(o) { return o.age; });\n// => { 'user': 'barney', 'age': 36 }\n\n// 使用了 `_.property` 的回调结果\n_.minBy(users, 'age');\n// => { 'user': 'barney', 'age': 36 }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/round", - "html":"

    round source npm

    \n
    _.round(number, [precision=0])
    \n\n

    根据 precision 四舍五入 number。

    \n
    \n\n

    参数

    \n
      \n
    1. number (number)

      要四舍五入的值

      \n
    2. \n
    3. [precision=0] (number)

      精度

      \n
    4. \n
    \n

    返回值 (number)

    \n

    返回四舍五入的结果

    \n
    \n

    示例

    \n
    _.round(4.006);\n// => 4\n\n_.round(4.006, 2);\n// => 4.01\n\n_.round(4060, -2);\n// => 4100\n
    \n
    \n
    \n\n
    " } + "html":"

    round source npm

    \n
    _.round(number, [precision=0])
    \n\n

    根据 precision 四舍五入 number。

    \n
    \n\n

    参数

    \n
      \n
    1. number (number)

      要四舍五入的值

      \n
    2. \n
    3. [precision=0] (number)

      精度

      \n
    4. \n
    \n

    返回值 (number)

    \n

    返回四舍五入的结果

    \n
    \n

    示例

    \n
    _.round(4.006);\n// => 4\n\n_.round(4.006, 2);\n// => 4.01\n\n_.round(4060, -2);\n// => 4100\n
    \n
    \n
    \n\n
    " } ,{ "href":"/subtract", - "html":"

    subtract source npm

    \n
    _.subtract(minuend, subtrahend)
    \n\n

    两双相减

    \n
    \n\n

    参数

    \n
      \n
    1. minuend (number)

      相减的第一个数

      \n
    2. \n
    3. subtrahend (number)

      相减的第二个数

      \n
    4. \n
    \n

    返回值 (number)

    \n

    返回结果

    \n
    \n

    示例

    \n
    _.subtract(6, 4);\n// => 2\n
    \n
    \n
    \n\n
    " } + "html":"

    subtract source npm

    \n
    _.subtract(minuend, subtrahend)
    \n\n

    两双相减

    \n
    \n\n

    参数

    \n
      \n
    1. minuend (number)

      相减的第一个数

      \n
    2. \n
    3. subtrahend (number)

      相减的第二个数

      \n
    4. \n
    \n

    返回值 (number)

    \n

    返回结果

    \n
    \n

    示例

    \n
    _.subtract(6, 4);\n// => 2\n
    \n
    \n
    \n\n
    " } ,{ "href":"/sum", - "html":"

    sum source npm

    \n
    _.sum(array)
    \n\n

    计算 array 中值的总和

    \n
    \n\n

    参数

    \n
      \n
    1. array (Array)

      要遍历的数组

      \n
    2. \n
    \n

    返回值 (number)

    \n

    返回总和

    \n
    \n

    示例

    \n
    _.sum([4, 2, 8, 6]);\n// => 20\n
    \n
    \n
    \n\n
    " } + "html":"

    sum source npm

    \n
    _.sum(array)
    \n\n

    计算 array 中值的总和

    \n
    \n\n

    参数

    \n
      \n
    1. array (Array)

      要遍历的数组

      \n
    2. \n
    \n

    返回值 (number)

    \n

    返回总和

    \n
    \n

    示例

    \n
    _.sum([4, 2, 8, 6]);\n// => 20\n
    \n
    \n
    \n\n
    " } ,{ "href":"/sumBy", - "html":"

    sumBy source npm

    \n
    _.sumBy(array, [iteratee=_.identity])
    \n\n

    这个方法类似 _.sum。\n除了它接受 iteratee 调用每一个元素,根据返回的 value 决定如何计算。 \niteratee 会传入1个参数:(value)。

    \n
    \n\n

    参数

    \n
      \n
    1. array (Array)

      要遍历的数组

      \n
    2. \n
    3. [iteratee=_.identity] (Function|Object|string)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (number)

    \n

    返回总和

    \n
    \n

    示例

    \n
    var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n\n_.sumBy(objects, function(o) { return o.n; });\n// => 20\n\n// 使用了 `_.property` 的回调结果\n_.sumBy(objects, 'n');\n// => 20\n
    \n
    \n
    \n\n
    " } + "html":"

    sumBy source npm

    \n
    _.sumBy(array, [iteratee=_.identity])
    \n\n

    这个方法类似 _.sum。\n除了它接受 iteratee 调用每一个元素,根据返回的 value 决定如何计算。 \niteratee 会传入1个参数:(value)。

    \n
    \n\n

    参数

    \n
      \n
    1. array (Array)

      要遍历的数组

      \n
    2. \n
    3. [iteratee=_.identity] (Function|Object|string)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (number)

    \n

    返回总和

    \n
    \n

    示例

    \n
    var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n\n_.sumBy(objects, function(o) { return o.n; });\n// => 20\n\n// 使用了 `_.property` 的回调结果\n_.sumBy(objects, 'n');\n// => 20\n
    \n
    \n
    \n\n
    " } ,{ "href":"/stringSize", "html":"

    stringSize source

    \n
    stringSize(string)
    \n\n

    获得字符串的长度

    \n
    \n\n

    参数

    \n
      \n
    1. string (string)

      要处理的字符串

      \n
    2. \n
    \n

    返回值 (number)

    \n

    返回字符串长度

    \n
    \n
    \n\n
    " } ,{ "href":"/templateSettings-imports-_", "html":"

    templateSettings.imports._ source

    \n
    _.templateSettings.imports._
    \n\n

    lodash 函数的引用

    \n
    \n\n
    \n\n
    " } ,{ "href":"/clamp", - "html":"

    clamp source npm

    \n
    _.clamp(number, [min], max)
    \n\n

    返回限制在 minmax 之间的值

    \n
    \n\n

    参数

    \n
      \n
    1. number (number)

      被限制的值

      \n
    2. \n
    3. [min] (number)

      最小绝对值

      \n
    4. \n
    5. max (number)

      最大绝对值

      \n
    6. \n
    \n

    返回值 (number)

    \n

    [min, max] 中的一个

    \n
    \n

    示例

    \n
    _.clamp(-10, -5, 5);\n// => -5\n\n_.clamp(10, -5, 5);\n// => 5\n
    \n
    \n
    \n\n
    " } + "html":"

    clamp source npm

    \n
    _.clamp(number, [min], max)
    \n\n

    返回限制在 minmax 之间的值

    \n
    \n\n

    参数

    \n
      \n
    1. number (number)

      被限制的值

      \n
    2. \n
    3. [min] (number)

      最小绝对值

      \n
    4. \n
    5. max (number)

      最大绝对值

      \n
    6. \n
    \n

    返回值 (number)

    \n

    [min, max] 中的一个

    \n
    \n

    示例

    \n
    _.clamp(-10, -5, 5);\n// => -5\n\n_.clamp(10, -5, 5);\n// => 5\n
    \n
    \n
    \n\n
    " } ,{ "href":"/inRange", - "html":"

    inRange source npm

    \n
    _.inRange(number, [start=0], end)
    \n\n

    检查 n 是否在 startend 之间,但不包括 end。\n如果 end 没有指定,那么 start 设置为0。\n如果 start 大于 end,那么参数会交换以便支持负范围。

    \n
    \n\n

    参数

    \n
      \n
    1. number (number)

      要检查的值

      \n
    2. \n
    3. [start=0] (number)

      开始范围

      \n
    4. \n
    5. end (number)

      结束范围

      \n
    6. \n
    \n

    返回值 (boolean)

    \n

    如果值在范围内返回true,否则返回 false

    \n
    \n

    示例

    \n
    _.inRange(3, 2, 4);\n// => true\n\n_.inRange(4, 8);\n// => true\n\n_.inRange(4, 2);\n// => false\n\n_.inRange(2, 2);\n// => false\n\n_.inRange(1.2, 2);\n// => true\n\n_.inRange(5.2, 4);\n// => false\n\n_.inRange(-3, -2, -6);\n// => true\n
    \n
    \n
    \n\n
    " } + "html":"

    inRange source npm

    \n
    _.inRange(number, [start=0], end)
    \n\n

    检查 n 是否在 startend 之间,但不包括 end。\n如果 end 没有指定,那么 start 设置为0。\n如果 start 大于 end,那么参数会交换以便支持负范围。

    \n
    \n\n

    参数

    \n
      \n
    1. number (number)

      要检查的值

      \n
    2. \n
    3. [start=0] (number)

      开始范围

      \n
    4. \n
    5. end (number)

      结束范围

      \n
    6. \n
    \n

    返回值 (boolean)

    \n

    如果值在范围内返回true,否则返回 false

    \n
    \n

    示例

    \n
    _.inRange(3, 2, 4);\n// => true\n\n_.inRange(4, 8);\n// => true\n\n_.inRange(4, 2);\n// => false\n\n_.inRange(2, 2);\n// => false\n\n_.inRange(1.2, 2);\n// => true\n\n_.inRange(5.2, 4);\n// => false\n\n_.inRange(-3, -2, -6);\n// => true\n
    \n
    \n
    \n\n
    " } ,{ "href":"/random", - "html":"

    random source npm

    \n
    _.random([min=0], [max=1], [floating])
    \n\n

    产生一个包括 minmax 之间的数。\n如果只提供一个参数返回一个0到提供数之间的数。\n如果 floating 设为 true,或者 minmax 是浮点数,结果返回浮点数。\n
    \n
    \n注意: JavaScript 遵循 IEEE-754 标准处理无法预料的浮点数结果。

    \n
    \n\n

    参数

    \n
      \n
    1. [min=0] (number)

      最小值

      \n
    2. \n
    3. [max=1] (number)

      最大值

      \n
    4. \n
    5. [floating] (boolean)

      是否返回浮点数

      \n
    6. \n
    \n

    返回值 (number)

    \n

    返回随机数

    \n
    \n

    示例

    \n
    _.random(0, 5);\n// =>  0 和 5 之间的数\n\n_.random(5);\n// => 同样是 0 和 5 之间的数\n\n_.random(5, true);\n// => 0 和 5 之间的浮点数\n\n_.random(1.2, 5.2);\n// =>  1.2 和 5.2 之间的浮点数\n
    \n
    \n
    \n\n
    " } + "html":"

    random source npm

    \n
    _.random([min=0], [max=1], [floating])
    \n\n

    产生一个包括 minmax 之间的数。\n如果只提供一个参数返回一个0到提供数之间的数。\n如果 floating 设为 true,或者 minmax 是浮点数,结果返回浮点数。\n
    \n
    \n注意: JavaScript 遵循 IEEE-754 标准处理无法预料的浮点数结果。

    \n
    \n\n

    参数

    \n
      \n
    1. [min=0] (number)

      最小值

      \n
    2. \n
    3. [max=1] (number)

      最大值

      \n
    4. \n
    5. [floating] (boolean)

      是否返回浮点数

      \n
    6. \n
    \n

    返回值 (number)

    \n

    返回随机数

    \n
    \n

    示例

    \n
    _.random(0, 5);\n// =>  0 和 5 之间的数\n\n_.random(5);\n// => 同样是 0 和 5 之间的数\n\n_.random(5, true);\n// => 0 和 5 之间的浮点数\n\n_.random(1.2, 5.2);\n// =>  1.2 和 5.2 之间的浮点数\n
    \n
    \n
    \n\n
    " } ,{ "href":"/assign", "html":"

    assign source npm

    \n
    _.assign(object, [sources])
    \n\n

    分配来源对象的可枚举属性到目标对象上。\n来源对象的应用规则是从左到右,随后的下一个对象的属性会覆盖上一个对象的属性。\n
    \n
    \n注意: 这方法会改变源对象,参考自\nObject.assign.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      目标对象

      \n
    2. \n
    3. [sources] (...Object)

      来源对象

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    function Foo() {\n  this.c = 3;\n}\n\nfunction Bar() {\n  this.e = 5;\n}\n\nFoo.prototype.d = 4;\nBar.prototype.f = 6;\n\n_.assign({ 'a': 1 }, new Foo, new Bar);\n// => { 'a': 1, 'c': 3, 'e': 5 }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/assignIn", @@ -381,77 +381,77 @@ ,{ "href":"/assignWith", "html":"

    assignWith source npm

    \n
    _.assignWith(object, sources, [customizer])
    \n\n

    这个方法类似 _.assign。\n除了它接受一个 customizer决定如何分配值。\n如果customizer返回undefined将会分配处理方法代替。customizer` 会传入5个参数:(objValue, srcValue, key, object, source)。\n
    \n
    \n注意: 这方法会改变源对象

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      目标对象

      \n
    2. \n
    3. sources (...Object)

      来源对象

      \n
    4. \n
    5. [customizer] (Function)

      这个函数决定分配的值

      \n
    6. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    function customizer(objValue, srcValue) {\n  return _.isUndefined(objValue) ? srcValue : objValue;\n}\n\nvar defaults = _.partialRight(_.assignWith, customizer);\n\ndefaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n// => { 'a': 1, 'b': 2 }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/at", - "html":"

    at source npm

    \n
    _.at(object, [paths])
    \n\n

    Creates an array of values corresponding to paths of object.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to iterate over.

      \n
    2. \n
    3. [paths] (...(string|string[])

      The property paths of elements to pick, specified individually or in arrays.

      \n
    4. \n
    \n

    返回值 (Array)

    \n

    Returns the new array of picked elements.

    \n
    \n

    示例

    \n
    var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n\n_.at(object, ['a[0].b.c', 'a[1]']);\n// => [3, 4]\n\n_.at(['a', 'b', 'c'], 0, 2);\n// => ['a', 'c']\n
    \n
    \n
    \n\n
    " } + "html":"

    at source npm

    \n
    _.at(object, [paths])
    \n\n

    根据 object 的路径获取值为数组。

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要遍历的对象

      \n
    2. \n
    3. [paths] (...(string|string[])

      要获取的对象的元素路径,单独指定或者指定在数组中

      \n
    4. \n
    \n

    返回值 (Array)

    \n

    返回选中值的数组

    \n
    \n

    示例

    \n
    var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n\n_.at(object, ['a[0].b.c', 'a[1]']);\n// => [3, 4]\n\n_.at(['a', 'b', 'c'], 0, 2);\n// => ['a', 'c']\n
    \n
    \n
    \n\n
    " } ,{ "href":"/create", - "html":"

    create source npm

    \n
    _.create(prototype, [properties])
    \n\n

    Creates an object that inherits from the prototype object. If a properties\nobject is provided its own enumerable properties are assigned to the created object.

    \n
    \n\n

    参数

    \n
      \n
    1. prototype (Object)

      The object to inherit from.

      \n
    2. \n
    3. [properties] (Object)

      The properties to assign to the object.

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    Returns the new object.

    \n
    \n

    示例

    \n
    function Shape() {\n  this.x = 0;\n  this.y = 0;\n}\n\nfunction Circle() {\n  Shape.call(this);\n}\n\nCircle.prototype = _.create(Shape.prototype, {\n  'constructor': Circle\n});\n\nvar circle = new Circle;\ncircle instanceof Circle;\n// => true\n\ncircle instanceof Shape;\n// => true\n
    \n
    \n
    \n\n
    " } + "html":"

    create source npm

    \n
    _.create(prototype, [properties])
    \n\n

    创建一个继承 prototype 的对象。\n如果提供了 properties,它的可枚举属性会被分配到创建的对象上。

    \n
    \n\n

    参数

    \n
      \n
    1. prototype (Object)

      要继承的对象

      \n
    2. \n
    3. [properties] (Object)

      待分配的属性

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回新对象

    \n
    \n

    示例

    \n
    function Shape() {\n  this.x = 0;\n  this.y = 0;\n}\n\nfunction Circle() {\n  Shape.call(this);\n}\n\nCircle.prototype = _.create(Shape.prototype, {\n  'constructor': Circle\n});\n\nvar circle = new Circle;\ncircle instanceof Circle;\n// => true\n\ncircle instanceof Shape;\n// => true\n
    \n
    \n
    \n\n
    " } ,{ "href":"/defaults", - "html":"

    defaults source npm

    \n
    _.defaults(object, [sources])
    \n\n

    Assigns own and inherited enumerable properties of source objects to the\ndestination object for all destination properties that resolve to undefined.\nSource objects are applied from left to right. Once a property is set,\nadditional values of the same property are ignored.\n
    \n
    \n注意: 这方法会改变源对象

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      目标对象

      \n
    2. \n
    3. [sources] (...Object)

      来源对象

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });\n// => { 'user': 'barney', 'age': 36 }\n
    \n
    \n
    \n\n
    " } + "html":"

    defaults source npm

    \n
    _.defaults(object, [sources])
    \n\n

    分配来源对象的可枚举属性到目标对象所有解析为 undefined 的属性上。\n来源对象从左到右应用。\n一旦设置了相同属性的值,后续的将被忽略掉。\n
    \n
    \n注意: 这方法会改变源对象

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      目标对象

      \n
    2. \n
    3. [sources] (...Object)

      来源对象

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });\n// => { 'user': 'barney', 'age': 36 }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/defaultsDeep", - "html":"

    defaultsDeep source npm

    \n
    _.defaultsDeep(object, [sources])
    \n\n

    这个方法类似 _.defaults except that it recursively assigns\ndefault properties.\n
    \n
    \n注意: 这方法会改变源对象

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      目标对象

      \n
    2. \n
    3. [sources] (...Object)

      来源对象

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });\n// => { 'user': { 'name': 'barney', 'age': 36 } }\n
    \n
    \n
    \n\n
    " } + "html":"

    defaultsDeep source npm

    \n
    _.defaultsDeep(object, [sources])
    \n\n

    这个方法类似 _.defaults,除了它会递归分配默认属性。\n
    \n
    \n注意: 这方法会改变源对象

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      目标对象

      \n
    2. \n
    3. [sources] (...Object)

      来源对象

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });\n// => { 'user': { 'name': 'barney', 'age': 36 } }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/findKey", - "html":"

    findKey source npm

    \n
    _.findKey(object, [predicate=_.identity])
    \n\n

    这个方法类似 _.find except that it returns the key of the first\nelement predicate returns truthy for instead of the element itself.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to search.

      \n
    2. \n
    3. [predicate=_.identity] (Function|Object|string)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (string|undefined)

    \n

    Returns the key of the matched element, else undefined.

    \n
    \n

    示例

    \n
    var users = {\n  'barney':  { 'age': 36, 'active': true },\n  'fred':    { 'age': 40, 'active': false },\n  'pebbles': { 'age': 1,  'active': true }\n};\n\n_.findKey(users, function(o) { return o.age < 40; });\n// => 'barney' (无法保证遍历的顺序)\n\n// 使用了 `_.matches` 的回调结果\n_.findKey(users, { 'age': 1, 'active': true });\n// => 'pebbles'\n\n// 使用了 `_.matchesProperty` 的回调结果\n_.findKey(users, ['active', false]);\n// => 'fred'\n\n// 使用了 `_.property` 的回调结果\n_.findKey(users, 'active');\n// => 'barney'\n
    \n
    \n
    \n\n
    " } + "html":"

    findKey source npm

    \n
    _.findKey(object, [predicate=_.identity])
    \n\n

    这个方法类似 _.find。\n除了它返回最先被 predicate 判断为真值的元素 key,而不是元素本身。

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      需要检索的对象

      \n
    2. \n
    3. [predicate=_.identity] (Function|Object|string)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (string|undefined)

    \n

    返回匹配的 key,否则返回 undefined

    \n
    \n

    示例

    \n
    var users = {\n  'barney':  { 'age': 36, 'active': true },\n  'fred':    { 'age': 40, 'active': false },\n  'pebbles': { 'age': 1,  'active': true }\n};\n\n_.findKey(users, function(o) { return o.age < 40; });\n// => 'barney' (无法保证遍历的顺序)\n\n// 使用了 `_.matches` 的回调结果\n_.findKey(users, { 'age': 1, 'active': true });\n// => 'pebbles'\n\n// 使用了 `_.matchesProperty` 的回调结果\n_.findKey(users, ['active', false]);\n// => 'fred'\n\n// 使用了 `_.property` 的回调结果\n_.findKey(users, 'active');\n// => 'barney'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/findLastKey", - "html":"

    findLastKey source npm

    \n
    _.findLastKey(object, [predicate=_.identity])
    \n\n

    这个方法类似 _.findKey except that it iterates over elements of\na collection in the opposite order.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to search.

      \n
    2. \n
    3. [predicate=_.identity] (Function|Object|string)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (string|undefined)

    \n

    Returns the key of the matched element, else undefined.

    \n
    \n

    示例

    \n
    var users = {\n  'barney':  { 'age': 36, 'active': true },\n  'fred':    { 'age': 40, 'active': false },\n  'pebbles': { 'age': 1,  'active': true }\n};\n\n_.findLastKey(users, function(o) { return o.age < 40; });\n// => returns 'pebbles' assuming `_.findKey` returns 'barney'\n\n// 使用了 `_.matches` 的回调结果\n_.findLastKey(users, { 'age': 36, 'active': true });\n// => 'barney'\n\n// 使用了 `_.matchesProperty` 的回调结果\n_.findLastKey(users, ['active', false]);\n// => 'fred'\n\n// 使用了 `_.property` 的回调结果\n_.findLastKey(users, 'active');\n// => 'pebbles'\n
    \n
    \n
    \n\n
    " } + "html":"

    findLastKey source npm

    \n
    _.findLastKey(object, [predicate=_.identity])
    \n\n

    这个方法类似 _.findKey。\n不过它是反方向开始遍历的。

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      需要检索的对象

      \n
    2. \n
    3. [predicate=_.identity] (Function|Object|string)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (string|undefined)

    \n

    返回匹配的 key,否则返回 undefined

    \n
    \n

    示例

    \n
    var users = {\n  'barney':  { 'age': 36, 'active': true },\n  'fred':    { 'age': 40, 'active': false },\n  'pebbles': { 'age': 1,  'active': true }\n};\n\n_.findLastKey(users, function(o) { return o.age < 40; });\n// => 返回 'pebbles', `_.findKey` 会返回 'barney'\n\n// 使用了 `_.matches` 的回调结果\n_.findLastKey(users, { 'age': 36, 'active': true });\n// => 'barney'\n\n// 使用了 `_.matchesProperty` 的回调结果\n_.findLastKey(users, ['active', false]);\n// => 'fred'\n\n// 使用了 `_.property` 的回调结果\n_.findLastKey(users, 'active');\n// => 'pebbles'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/forIn", - "html":"

    forIn source npm

    \n
    _.forIn(object, [iteratee=_.identity])
    \n\n

    Iterates over own and inherited enumerable properties of an object invoking\niteratee for each property. The iteratee is invoked with three arguments:
    \n(value, key, object). Iteratee functions may exit iteration early by explicitly\nreturning false.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to iterate over.

      \n
    2. \n
    3. [iteratee=_.identity] (Function)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.forIn(new Foo, function(value, key) {\n  console.log(key);\n});\n// => logs 'a', 'b', then 'c' (无法保证遍历的顺序)\n
    \n
    \n
    \n\n
    " } + "html":"

    forIn source npm

    \n
    _.forIn(object, [iteratee=_.identity])
    \n\n

    使用 iteratee 遍历对象的自身和继承的可枚举属性。\niteratee 会传入3个参数:(value, key, object)。\n如果返回 false,iteratee 会提前退出遍历。

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要遍历的对象

      \n
    2. \n
    3. [iteratee=_.identity] (Function)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.forIn(new Foo, function(value, key) {\n  console.log(key);\n});\n// => 输出 'a', 'b', 然后 'c' (无法保证遍历的顺序)\n
    \n
    \n
    \n\n
    " } ,{ "href":"/forInRight", - "html":"

    forInRight source npm

    \n
    _.forInRight(object, [iteratee=_.identity])
    \n\n

    这个方法类似 _.forIn except that it iterates over properties of\nobject in the opposite order.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to iterate over.

      \n
    2. \n
    3. [iteratee=_.identity] (Function)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.forInRight(new Foo, function(value, key) {\n  console.log(key);\n});\n// => logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'\n
    \n
    \n
    \n\n
    " } + "html":"

    forInRight source npm

    \n
    _.forInRight(object, [iteratee=_.identity])
    \n\n

    这个方法类似 _.forIn。\n除了它是反方向开始遍历的。

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要遍历的对象

      \n
    2. \n
    3. [iteratee=_.identity] (Function)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.forInRight(new Foo, function(value, key) {\n  console.log(key);\n});\n// => 输出 'c', 'b', 然后 'a', `_.forIn` 会输出 'a', 'b', 然后 'c'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/forOwn", - "html":"

    forOwn source npm

    \n
    _.forOwn(object, [iteratee=_.identity])
    \n\n

    Iterates over own enumerable properties of an object invoking iteratee\nfor each property. The iteratee is invoked with three arguments:
    \n(value, key, object). Iteratee functions may exit iteration early by\nexplicitly returning false.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to iterate over.

      \n
    2. \n
    3. [iteratee=_.identity] (Function)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.forOwn(new Foo, function(value, key) {\n  console.log(key);\n});\n// => logs 'a' then 'b' (无法保证遍历的顺序)\n
    \n
    \n
    \n\n
    " } + "html":"

    forOwn source npm

    \n
    _.forOwn(object, [iteratee=_.identity])
    \n\n

    使用 iteratee 遍历自身的可枚举属性。\niteratee 会传入3个参数:(value, key, object)。 如果返回 false,iteratee 会提前退出遍历。

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要遍历的对象

      \n
    2. \n
    3. [iteratee=_.identity] (Function)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.forOwn(new Foo, function(value, key) {\n  console.log(key);\n});\n// => 输出 'a' 然后 'b' (无法保证遍历的顺序)\n
    \n
    \n
    \n\n
    " } ,{ "href":"/forOwnRight", - "html":"

    forOwnRight source npm

    \n
    _.forOwnRight(object, [iteratee=_.identity])
    \n\n

    这个方法类似 _.forOwn except that it iterates over properties of\nobject in the opposite order.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to iterate over.

      \n
    2. \n
    3. [iteratee=_.identity] (Function)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.forOwnRight(new Foo, function(value, key) {\n  console.log(key);\n});\n// => logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'\n
    \n
    \n
    \n\n
    " } + "html":"

    forOwnRight source npm

    \n
    _.forOwnRight(object, [iteratee=_.identity])
    \n\n

    这个方法类似 _.forOwn。 除了它是反方向开始遍历的。

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要遍历的对象

      \n
    2. \n
    3. [iteratee=_.identity] (Function)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.forOwnRight(new Foo, function(value, key) {\n  console.log(key);\n});\n// => 输出 'b' 然后 'a', `_.forOwn` 会输出 'a' 然后 'b'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/functions", - "html":"

    functions source npm

    \n
    _.functions(object)
    \n\n

    Creates an array of function property names from own enumerable properties\nof object.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to inspect.

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    Returns the new array of property names.

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = _.constant('a');\n  this.b = _.constant('b');\n}\n\nFoo.prototype.c = _.constant('c');\n\n_.functions(new Foo);\n// => ['a', 'b']\n
    \n
    \n
    \n\n
    " } + "html":"

    functions source npm

    \n
    _.functions(object)
    \n\n

    返回一个 function 对象自身可枚举属性名的数组。

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要检索的对象

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    返回包含属性名的新数组

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = _.constant('a');\n  this.b = _.constant('b');\n}\n\nFoo.prototype.c = _.constant('c');\n\n_.functions(new Foo);\n// => ['a', 'b']\n
    \n
    \n
    \n\n
    " } ,{ "href":"/functionsIn", - "html":"

    functionsIn source npm

    \n
    _.functionsIn(object)
    \n\n

    Creates an array of function property names from own and inherited\nenumerable properties of object.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to inspect.

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    Returns the new array of property names.

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = _.constant('a');\n  this.b = _.constant('b');\n}\n\nFoo.prototype.c = _.constant('c');\n\n_.functionsIn(new Foo);\n// => ['a', 'b', 'c']\n
    \n
    \n
    \n\n
    " } + "html":"

    functionsIn source npm

    \n
    _.functionsIn(object)
    \n\n

    返回一个 function 对象自身和继承的可枚举属性名的数组。

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要检索的对象

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    返回包含属性名的新数组

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = _.constant('a');\n  this.b = _.constant('b');\n}\n\nFoo.prototype.c = _.constant('c');\n\n_.functionsIn(new Foo);\n// => ['a', 'b', 'c']\n
    \n
    \n
    \n\n
    " } ,{ "href":"/get", - "html":"

    get source npm

    \n
    _.get(object, path, [defaultValue])
    \n\n

    Gets the value at path of object. If the resolved value is\nundefined the defaultValue is used in its place.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to query.

      \n
    2. \n
    3. path (Array|string)

      The path of the property to get.

      \n
    4. \n
    5. [defaultValue] (*)

      The value returned if the resolved value is undefined.

      \n
    6. \n
    \n

    返回值 (*)

    \n

    Returns the resolved value.

    \n
    \n

    示例

    \n
    var object = { 'a': [{ 'b': { 'c': 3 } }] };\n\n_.get(object, 'a[0].b.c');\n// => 3\n\n_.get(object, ['a', '0', 'b', 'c']);\n// => 3\n\n_.get(object, 'a.b.c', 'default');\n// => 'default'\n
    \n
    \n
    \n\n
    " } + "html":"

    get source npm

    \n
    _.get(object, path, [defaultValue])
    \n\n

    根据对象路径获取值。\n如果解析 value 是 undefined 会以 defaultValue 取代。

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要检索的对象

      \n
    2. \n
    3. path (Array|string)

      要获取的对象路径

      \n
    4. \n
    5. [defaultValue] (*)

      如果解析值是 undefined,这值会被返回

      \n
    6. \n
    \n

    返回值 (*)

    \n

    返回解析的值

    \n
    \n

    示例

    \n
    var object = { 'a': [{ 'b': { 'c': 3 } }] };\n\n_.get(object, 'a[0].b.c');\n// => 3\n\n_.get(object, ['a', '0', 'b', 'c']);\n// => 3\n\n_.get(object, 'a.b.c', 'default');\n// => 'default'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/has", - "html":"

    has source npm

    \n
    _.has(object, path)
    \n\n

    Checks if path is a direct property of object.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to query.

      \n
    2. \n
    3. path (Array|string)

      The path to check.

      \n
    4. \n
    \n

    返回值 (boolean)

    \n

    Returns true if path exists否则返回 false

    \n
    \n

    示例

    \n
    var object = { 'a': { 'b': { 'c': 3 } } };\nvar other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });\n\n_.has(object, 'a');\n// => true\n\n_.has(object, 'a.b.c');\n// => true\n\n_.has(object, ['a', 'b', 'c']);\n// => true\n\n_.has(other, 'a');\n// => false\n
    \n
    \n
    \n\n
    " } + "html":"

    has source npm

    \n
    _.has(object, path)
    \n\n

    检查 path 是否是对象的直接属性。

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要检索的对象

      \n
    2. \n
    3. path (Array|string)

      要检查的路径

      \n
    4. \n
    \n

    返回值 (boolean)

    \n

    如果存在返回 true,否则返回 false

    \n
    \n

    示例

    \n
    var object = { 'a': { 'b': { 'c': 3 } } };\nvar other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });\n\n_.has(object, 'a');\n// => true\n\n_.has(object, 'a.b.c');\n// => true\n\n_.has(object, ['a', 'b', 'c']);\n// => true\n\n_.has(other, 'a');\n// => false\n
    \n
    \n
    \n\n
    " } ,{ "href":"/hasIn", - "html":"

    hasIn source npm

    \n
    _.hasIn(object, path)
    \n\n

    Checks if path is a direct or inherited property of object.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to query.

      \n
    2. \n
    3. path (Array|string)

      The path to check.

      \n
    4. \n
    \n

    返回值 (boolean)

    \n

    Returns true if path exists否则返回 false

    \n
    \n

    示例

    \n
    var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });\n\n_.hasIn(object, 'a');\n// => true\n\n_.hasIn(object, 'a.b.c');\n// => true\n\n_.hasIn(object, ['a', 'b', 'c']);\n// => true\n\n_.hasIn(object, 'b');\n// => false\n
    \n
    \n
    \n\n
    " } + "html":"

    hasIn source npm

    \n
    _.hasIn(object, path)
    \n\n

    检查 path 是否是对象的直接 或者 继承属性。

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要检索的对象

      \n
    2. \n
    3. path (Array|string)

      要检查的路径

      \n
    4. \n
    \n

    返回值 (boolean)

    \n

    如果存在返回 true,否则返回 false

    \n
    \n

    示例

    \n
    var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });\n\n_.hasIn(object, 'a');\n// => true\n\n_.hasIn(object, 'a.b.c');\n// => true\n\n_.hasIn(object, ['a', 'b', 'c']);\n// => true\n\n_.hasIn(object, 'b');\n// => false\n
    \n
    \n
    \n\n
    " } ,{ "href":"/invert", - "html":"

    invert source npm

    \n
    _.invert(object, [multiVal])
    \n\n

    Creates an object composed of the inverted keys and values of object.\nIf object contains duplicate values, subsequent values overwrite property\nassignments of previous values unless multiVal is true.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to invert.

      \n
    2. \n
    3. [multiVal] (boolean)

      Allow multiple values per key.

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    Returns the new inverted object.

    \n
    \n

    示例

    \n
    var object = { 'a': 1, 'b': 2, 'c': 1 };\n\n_.invert(object);\n// => { '1': 'c', '2': 'b' }\n\n// with `multiVal`\n_.invert(object, true);\n// => { '1': ['a', 'c'], '2': ['b'] }\n
    \n
    \n
    \n\n
    " } + "html":"

    invert source npm

    \n
    _.invert(object, [multiVal])
    \n\n

    创建一个键值倒置的对象。\n如果 object 有重复的值,后面的值会覆盖前面的值。\n如果 multiVal 为 true,重复的值则组成数组。

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要倒置的对象

      \n
    2. \n
    3. [multiVal] (boolean)

      每个 key 允许多个值

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回新的倒置的对象

    \n
    \n

    示例

    \n
    var object = { 'a': 1, 'b': 2, 'c': 1 };\n\n_.invert(object);\n// => { '1': 'c', '2': 'b' }\n\n// 使用 `multiVal`\n_.invert(object, true);\n// => { '1': ['a', 'c'], '2': ['b'] }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/invoke", - "html":"

    invoke source npm

    \n
    _.invoke(object, path, [args])
    \n\n

    Invokes the method at path of object.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to query.

      \n
    2. \n
    3. path (Array|string)

      The path of the method to invoke.

      \n
    4. \n
    5. [args] (...*)

      The arguments to invoke the method with.

      \n
    6. \n
    \n

    返回值 (*)

    \n

    Returns the result of the invoked method.

    \n
    \n

    示例

    \n
    var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n\n_.invoke(object, 'a[0].b.c.slice', 1, 3);\n// => [2, 3]\n
    \n
    \n
    \n\n
    " } + "html":"

    invoke source npm

    \n
    _.invoke(object, path, [args])
    \n\n

    调用对象路径的方法

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要检索的对象

      \n
    2. \n
    3. path (Array|string)

      要调用方法的路径

      \n
    4. \n
    5. [args] (...*)

      调用方法的参数

      \n
    6. \n
    \n

    返回值 (*)

    \n

    返回调用方法的结果

    \n
    \n

    示例

    \n
    var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n\n_.invoke(object, 'a[0].b.c.slice', 1, 3);\n// => [2, 3]\n
    \n
    \n
    \n\n
    " } ,{ "href":"/keys", - "html":"

    keys source npm

    \n
    _.keys(object)
    \n\n

    Creates an array of the own enumerable property names of object.\n
    \n
    \n注意: Non-object values are coerced to objects. See the\nES spec\nfor more details.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to query.

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    Returns the array of property names.

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.keys(new Foo);\n// => ['a', 'b'] (无法保证遍历的顺序)\n\n_.keys('hi');\n// => ['0', '1']\n
    \n
    \n
    \n\n
    " } + "html":"

    keys source npm

    \n
    _.keys(object)
    \n\n

    创建 object 自身可枚举属性名为一个数组。\n
    \n
    \n注意: 非对象的值会被强制转换为对象,查看\nES spec\n了解详情

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要检索的对象

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    返回包含属性名的数组

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.keys(new Foo);\n// => ['a', 'b'] (无法保证遍历的顺序)\n\n_.keys('hi');\n// => ['0', '1']\n
    \n
    \n
    \n\n
    " } ,{ "href":"/keysIn", - "html":"

    keysIn source npm

    \n
    _.keysIn(object)
    \n\n

    Creates an array of the own and inherited enumerable property names of object.\n
    \n
    \n注意: Non-object values are coerced to objects.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to query.

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    Returns the array of property names.

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.keysIn(new Foo);\n// => ['a', 'b', 'c'] (无法保证遍历的顺序)\n
    \n
    \n
    \n\n
    " } + "html":"

    keysIn source npm

    \n
    _.keysIn(object)
    \n\n

    创建 object 自身 或 继承的可枚举属性名为一个数组。\n
    \n
    \n注意: 非对象的值会被强制转换为对象

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要检索的对象

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    返回包含属性名的数组

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.keysIn(new Foo);\n// => ['a', 'b', 'c'] (无法保证遍历的顺序)\n
    \n
    \n
    \n\n
    " } ,{ "href":"/mapKeys", - "html":"

    mapKeys source npm

    \n
    _.mapKeys(object, [iteratee=_.identity])
    \n\n

    The opposite of _.mapValues; this method creates an object with the\nsame values as object and keys generated by running each own enumerable\nproperty of object through iteratee.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to iterate over.

      \n
    2. \n
    3. [iteratee=_.identity] (Function|Object|string)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    Returns the new mapped object.

    \n
    \n

    示例

    \n
    _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n  return key + value;\n});\n// => { 'a1': 1, 'b2': 2 }\n
    \n
    \n
    \n\n
    " } + "html":"

    mapKeys source npm

    \n
    _.mapKeys(object, [iteratee=_.identity])
    \n\n

    反向版 _.mapValues。\n这个方法创建一个对象,对象的值与源对象相同,但 key 是通过 iteratee 产生的。

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要遍历的对象

      \n
    2. \n
    3. [iteratee=_.identity] (Function|Object|string)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回映射后的新对象

    \n
    \n

    示例

    \n
    _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n  return key + value;\n});\n// => { 'a1': 1, 'b2': 2 }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/mapValues", - "html":"

    mapValues source npm

    \n
    _.mapValues(object, [iteratee=_.identity])
    \n\n

    Creates an object with the same keys as object and values generated by\nrunning each own enumerable property of object through iteratee. The\niteratee function is invoked with three arguments: (value, key, object).

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to iterate over.

      \n
    2. \n
    3. [iteratee=_.identity] (Function|Object|string)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    Returns the new mapped object.

    \n
    \n

    示例

    \n
    var users = {\n  'fred':    { 'user': 'fred',    'age': 40 },\n  'pebbles': { 'user': 'pebbles', 'age': 1 }\n};\n\n_.mapValues(users, function(o) { return o.age; });\n// => { 'fred': 40, 'pebbles': 1 } (无法保证遍历的顺序)\n\n// 使用了 `_.property` 的回调结果\n_.mapValues(users, 'age');\n// => { 'fred': 40, 'pebbles': 1 } (无法保证遍历的顺序)\n
    \n
    \n
    \n\n
    " } + "html":"

    mapValues source npm

    \n
    _.mapValues(object, [iteratee=_.identity])
    \n\n

    创建一个对象,对象的key相同,值是通过 iteratee 产生的。\niteratee 会传入3个参数: (value, key, object)

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要遍历的对象

      \n
    2. \n
    3. [iteratee=_.identity] (Function|Object|string)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回映射后的对象

    \n
    \n

    示例

    \n
    var users = {\n  'fred':    { 'user': 'fred',    'age': 40 },\n  'pebbles': { 'user': 'pebbles', 'age': 1 }\n};\n\n_.mapValues(users, function(o) { return o.age; });\n// => { 'fred': 40, 'pebbles': 1 } (无法保证遍历的顺序)\n\n// 使用了 `_.property` 的回调结果\n_.mapValues(users, 'age');\n// => { 'fred': 40, 'pebbles': 1 } (无法保证遍历的顺序)\n
    \n
    \n
    \n\n
    " } ,{ "href":"/merge", - "html":"

    merge source npm

    \n
    _.merge(object, [sources])
    \n\n

    Recursively merges own and inherited enumerable properties of source\nobjects into the destination object, skipping source properties that resolve\nto undefined. Array and plain object properties are merged recursively.\nOther objects and value types are overridden by assignment. Source objects\nare applied from left to right. Subsequent sources overwrite property\nassignments of previous sources.\n
    \n
    \n注意: 这方法会改变源对象

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      目标对象

      \n
    2. \n
    3. [sources] (...Object)

      来源对象

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    var users = {\n  'data': [{ 'user': 'barney' }, { 'user': 'fred' }]\n};\n\nvar ages = {\n  'data': [{ 'age': 36 }, { 'age': 40 }]\n};\n\n_.merge(users, ages);\n// => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }\n
    \n
    \n
    \n\n
    " } + "html":"

    merge source npm

    \n
    _.merge(object, [sources])
    \n\n

    Recursively merges own and inherited enumerable properties of source\nobjects into the destination object, skipping source properties that resolve\nto undefined. Array and plain object properties are merged recursively.\nOther objects and value types are overridden by assignment. Source objects\nare applied from left to right. Subsequent sources overwrite property\nassignments of previous sources.\n
    \n
    \n注意: 这方法会改变源对象

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      目标对象

      \n
    2. \n
    3. [sources] (...Object)

      来源对象

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    var users = {\n  'data': [{ 'user': 'barney' }, { 'user': 'fred' }]\n};\n\nvar ages = {\n  'data': [{ 'age': 36 }, { 'age': 40 }]\n};\n\n_.merge(users, ages);\n// => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/mergeWith", - "html":"

    mergeWith source npm

    \n
    _.mergeWith(object, sources, customizer)
    \n\n

    这个方法类似 _.merge except that it accepts customizer which\nis invoked to produce the merged values of the destination and source\nproperties. If customizer returns undefined merging is handled by the\nmethod instead. The customizer is invoked with seven arguments:
    \n(objValue, srcValue, key, object, source, stack).

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      目标对象

      \n
    2. \n
    3. sources (...Object)

      来源对象

      \n
    4. \n
    5. customizer (Function)

      The function to customize assigned values.

      \n
    6. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    function customizer(objValue, srcValue) {\n  if (_.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n}\n\nvar object = {\n  'fruits': ['apple'],\n  'vegetables': ['beet']\n};\n\nvar other = {\n  'fruits': ['banana'],\n  'vegetables': ['carrot']\n};\n\n_.mergeWith(object, other, customizer);\n// => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }\n
    \n
    \n
    \n\n
    " } + "html":"

    mergeWith source npm

    \n
    _.mergeWith(object, sources, customizer)
    \n\n

    这个方法类似 _.merge except that it accepts customizer which\nis invoked to produce the merged values of the destination and source\nproperties. If customizer returns undefined merging is handled by the\nmethod instead. The customizer is invoked with seven arguments:
    \n(objValue, srcValue, key, object, source, stack).

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      目标对象

      \n
    2. \n
    3. sources (...Object)

      来源对象

      \n
    4. \n
    5. customizer (Function)

      The function to customize assigned values.

      \n
    6. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    function customizer(objValue, srcValue) {\n  if (_.isArray(objValue)) {\n    return objValue.concat(srcValue);\n  }\n}\n\nvar object = {\n  'fruits': ['apple'],\n  'vegetables': ['beet']\n};\n\nvar other = {\n  'fruits': ['banana'],\n  'vegetables': ['carrot']\n};\n\n_.mergeWith(object, other, customizer);\n// => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/omit", - "html":"

    omit source npm

    \n
    _.omit(object, [props])
    \n\n

    The opposite of _.pick; this method creates an object composed of the\nown and inherited enumerable properties of object that are not omitted.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The source object.

      \n
    2. \n
    3. [props] (...(string|string[])

      The property names to omit, specified individually or in arrays..

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    Returns the new object.

    \n
    \n

    示例

    \n
    var object = { 'user': 'fred', 'age': 40 };\n\n_.omit(object, 'user');\n// => { 'age': 40 }\n
    \n
    \n
    \n\n
    " } + "html":"

    omit source npm

    \n
    _.omit(object, [props])
    \n\n

    The opposite of _.pick; this method creates an object composed of the\nown and inherited enumerable properties of object that are not omitted.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The source object.

      \n
    2. \n
    3. [props] (...(string|string[])

      The property names to omit, specified individually or in arrays..

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    Returns the new object.

    \n
    \n

    示例

    \n
    var object = { 'user': 'fred', 'age': 40 };\n\n_.omit(object, 'user');\n// => { 'age': 40 }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/omitBy", - "html":"

    omitBy source npm

    \n
    _.omitBy(object, [predicate=_.identity])
    \n\n

    The opposite of _.pickBy; this method creates an object composed of the\nown and inherited enumerable properties of object that predicate\ndoesn't return truthy for.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The source object.

      \n
    2. \n
    3. [predicate=_.identity] (Function|Object|string)

      The function invoked per property.

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    Returns the new object.

    \n
    \n

    示例

    \n
    var object = { 'user': 'fred', 'age': 40 };\n\n_.omitBy(object, _.isNumber);\n// => { 'user': 'fred' }\n
    \n
    \n
    \n\n
    " } + "html":"

    omitBy source npm

    \n
    _.omitBy(object, [predicate=_.identity])
    \n\n

    The opposite of _.pickBy; this method creates an object composed of the\nown and inherited enumerable properties of object that predicate\ndoesn't return truthy for.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The source object.

      \n
    2. \n
    3. [predicate=_.identity] (Function|Object|string)

      The function invoked per property.

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    Returns the new object.

    \n
    \n

    示例

    \n
    var object = { 'user': 'fred', 'age': 40 };\n\n_.omitBy(object, _.isNumber);\n// => { 'user': 'fred' }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/pick", - "html":"

    pick source npm

    \n
    _.pick(object, [props])
    \n\n

    Creates an object composed of the picked object properties.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The source object.

      \n
    2. \n
    3. [props] (...(string|string[])

      The property names to pick, specified individually or in arrays.

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    Returns the new object.

    \n
    \n

    示例

    \n
    var object = { 'user': 'fred', 'age': 40 };\n\n_.pick(object, 'user');\n// => { 'user': 'fred' }\n
    \n
    \n
    \n\n
    " } + "html":"

    pick source npm

    \n
    _.pick(object, [props])
    \n\n

    Creates an object composed of the picked object properties.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The source object.

      \n
    2. \n
    3. [props] (...(string|string[])

      The property names to pick, specified individually or in arrays.

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    Returns the new object.

    \n
    \n

    示例

    \n
    var object = { 'user': 'fred', 'age': 40 };\n\n_.pick(object, 'user');\n// => { 'user': 'fred' }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/pickBy", - "html":"

    pickBy source npm

    \n
    _.pickBy(object, [predicate=_.identity])
    \n\n

    Creates an object composed of the object properties predicate returns\ntruthy for. The predicate is invoked with one argument: (value).

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The source object.

      \n
    2. \n
    3. [predicate=_.identity] (Function|Object|string)

      The function invoked per property.

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    Returns the new object.

    \n
    \n

    示例

    \n
    var object = { 'user': 'fred', 'age': 40 };\n\n_.pickBy(object, _.isNumber);\n// => { 'age': 40 }\n
    \n
    \n
    \n\n
    " } + "html":"

    pickBy source npm

    \n
    _.pickBy(object, [predicate=_.identity])
    \n\n

    Creates an object composed of the object properties predicate returns\ntruthy for. The predicate is invoked with one argument: (value).

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The source object.

      \n
    2. \n
    3. [predicate=_.identity] (Function|Object|string)

      The function invoked per property.

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    Returns the new object.

    \n
    \n

    示例

    \n
    var object = { 'user': 'fred', 'age': 40 };\n\n_.pickBy(object, _.isNumber);\n// => { 'age': 40 }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/result", - "html":"

    result source npm

    \n
    _.result(object, path, [defaultValue])
    \n\n

    这个方法类似 _.get except that if the resolved value is a function\nit's invoked with the this binding of its parent object and its result\nis returned.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to query.

      \n
    2. \n
    3. path (Array|string)

      The path of the property to resolve.

      \n
    4. \n
    5. [defaultValue] (*)

      The value returned if the resolved value is undefined.

      \n
    6. \n
    \n

    返回值 (*)

    \n

    Returns the resolved value.

    \n
    \n

    示例

    \n
    var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n\n_.result(object, 'a[0].b.c1');\n// => 3\n\n_.result(object, 'a[0].b.c2');\n// => 4\n\n_.result(object, 'a[0].b.c3', 'default');\n// => 'default'\n\n_.result(object, 'a[0].b.c3', _.constant('default'));\n// => 'default'\n
    \n
    \n
    \n\n
    " } + "html":"

    result source npm

    \n
    _.result(object, path, [defaultValue])
    \n\n

    这个方法类似 _.get except that if the resolved value is a function\nit's invoked with the this binding of its parent object and its result\nis returned.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要检索的对象

      \n
    2. \n
    3. path (Array|string)

      The path of the property to resolve.

      \n
    4. \n
    5. [defaultValue] (*)

      The value returned if the resolved value is undefined.

      \n
    6. \n
    \n

    返回值 (*)

    \n

    Returns the resolved value.

    \n
    \n

    示例

    \n
    var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n\n_.result(object, 'a[0].b.c1');\n// => 3\n\n_.result(object, 'a[0].b.c2');\n// => 4\n\n_.result(object, 'a[0].b.c3', 'default');\n// => 'default'\n\n_.result(object, 'a[0].b.c3', _.constant('default'));\n// => 'default'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/set", - "html":"

    set source npm

    \n
    _.set(object, path, value)
    \n\n

    Sets the value at path of object. If a portion of path doesn't exist\nit's created. Arrays are created for missing index properties while objects\nare created for all other missing properties. Use _.setWith to customize\npath creation.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to modify.

      \n
    2. \n
    3. path (Array|string)

      The path of the property to set.

      \n
    4. \n
    5. value (*)

      The value to set.

      \n
    6. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    var object = { 'a': [{ 'b': { 'c': 3 } }] };\n\n_.set(object, 'a[0].b.c', 4);\nconsole.log(object.a[0].b.c);\n// => 4\n\n_.set(object, 'x[0].y.z', 5);\nconsole.log(object.x[0].y.z);\n// => 5\n
    \n
    \n
    \n\n
    " } + "html":"

    set source npm

    \n
    _.set(object, path, value)
    \n\n

    Sets the value at path of object. If a portion of path doesn't exist\nit's created. Arrays are created for missing index properties while objects\nare created for all other missing properties. Use _.setWith to customize\npath creation.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to modify.

      \n
    2. \n
    3. path (Array|string)

      The path of the property to set.

      \n
    4. \n
    5. value (*)

      The value to set.

      \n
    6. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    var object = { 'a': [{ 'b': { 'c': 3 } }] };\n\n_.set(object, 'a[0].b.c', 4);\nconsole.log(object.a[0].b.c);\n// => 4\n\n_.set(object, 'x[0].y.z', 5);\nconsole.log(object.x[0].y.z);\n// => 5\n
    \n
    \n
    \n\n
    " } ,{ "href":"/setWith", - "html":"

    setWith source npm

    \n
    _.setWith(object, path, value, [customizer])
    \n\n

    这个方法类似 _.set except that it accepts customizer which is\ninvoked to produce the objects of path. If customizer returns undefined\npath creation is handled by the method instead. The customizer is invoked\nwith three arguments: (nsValue, key, nsObject).

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to modify.

      \n
    2. \n
    3. path (Array|string)

      The path of the property to set.

      \n
    4. \n
    5. value (*)

      The value to set.

      \n
    6. \n
    7. [customizer] (Function)

      The function to customize assigned values.

      \n
    8. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    _.setWith({ '0': { 'length': 2 } }, '[0][1][2]', 3, Object);\n// => { '0': { '1': { '2': 3 }, 'length': 2 } }\n
    \n
    \n
    \n\n
    " } + "html":"

    setWith source npm

    \n
    _.setWith(object, path, value, [customizer])
    \n\n

    这个方法类似 _.set except that it accepts customizer which is\ninvoked to produce the objects of path. If customizer returns undefined\npath creation is handled by the method instead. The customizer is invoked\nwith three arguments: (nsValue, key, nsObject).

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to modify.

      \n
    2. \n
    3. path (Array|string)

      The path of the property to set.

      \n
    4. \n
    5. value (*)

      The value to set.

      \n
    6. \n
    7. [customizer] (Function)

      The function to customize assigned values.

      \n
    8. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    _.setWith({ '0': { 'length': 2 } }, '[0][1][2]', 3, Object);\n// => { '0': { '1': { '2': 3 }, 'length': 2 } }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/toPairs", - "html":"

    toPairs source npm

    \n
    _.toPairs(object)
    \n\n

    Creates an array of own enumerable key-value pairs for object.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to query.

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    Returns the new array of key-value pairs.

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.toPairs(new Foo);\n// => [['a', 1], ['b', 2]] (无法保证遍历的顺序)\n
    \n
    \n
    \n\n
    " } + "html":"

    toPairs source npm

    \n
    _.toPairs(object)
    \n\n

    Creates an array of own enumerable key-value pairs for object.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要检索的对象

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    Returns the new array of key-value pairs.

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.toPairs(new Foo);\n// => [['a', 1], ['b', 2]] (无法保证遍历的顺序)\n
    \n
    \n
    \n\n
    " } ,{ "href":"/toPairsIn", - "html":"

    toPairsIn source npm

    \n
    _.toPairsIn(object)
    \n\n

    Creates an array of own and inherited enumerable key-value pairs for object.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to query.

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    Returns the new array of key-value pairs.

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.toPairsIn(new Foo);\n// => [['a', 1], ['b', 2], ['c', 1]] (无法保证遍历的顺序)\n
    \n
    \n
    \n\n
    " } + "html":"

    toPairsIn source npm

    \n
    _.toPairsIn(object)
    \n\n

    Creates an array of own and inherited enumerable key-value pairs for object.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要检索的对象

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    Returns the new array of key-value pairs.

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.toPairsIn(new Foo);\n// => [['a', 1], ['b', 2], ['c', 1]] (无法保证遍历的顺序)\n
    \n
    \n
    \n\n
    " } ,{ "href":"/transform", - "html":"

    transform source npm

    \n
    _.transform(object, [iteratee=_.identity], [accumulator])
    \n\n

    An alternative to _.reduce; this method transforms object to a new\naccumulator object which is the result of running each of its own enumerable\nproperties through iteratee, with each invocation potentially mutating\nthe accumulator object. The iteratee is invoked with four arguments:
    \n(accumulator, value, key, object). Iteratee functions may exit iteration\nearly by explicitly returning false.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Array|Object)

      The object to iterate over.

      \n
    2. \n
    3. [iteratee=_.identity] (Function)

      这个函数会处理每一个元素

      \n
    4. \n
    5. [accumulator] (*)

      The custom accumulator value.

      \n
    6. \n
    \n

    返回值 (*)

    \n

    Returns the accumulated value.

    \n
    \n

    示例

    \n
    _.transform([2, 3, 4], function(result, n) {\n  result.push(n *= n);\n  return n % 2 == 0;\n});\n// => [4, 9]\n\n_.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n  (result[value] || (result[value] = [])).push(key);\n});\n// => { '1': ['a', 'c'], '2': ['b'] }\n
    \n
    \n
    \n\n
    " } + "html":"

    transform source npm

    \n
    _.transform(object, [iteratee=_.identity], [accumulator])
    \n\n

    An alternative to _.reduce; this method transforms object to a new\naccumulator object which is the result of running each of its own enumerable\nproperties through iteratee, with each invocation potentially mutating\nthe accumulator object. The iteratee is invoked with four arguments:
    \n(accumulator, value, key, object). Iteratee functions may exit iteration\nearly by explicitly returning false.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Array|Object)

      要遍历的对象

      \n
    2. \n
    3. [iteratee=_.identity] (Function)

      这个函数会处理每一个元素

      \n
    4. \n
    5. [accumulator] (*)

      The custom accumulator value.

      \n
    6. \n
    \n

    返回值 (*)

    \n

    Returns the accumulated value.

    \n
    \n

    示例

    \n
    _.transform([2, 3, 4], function(result, n) {\n  result.push(n *= n);\n  return n % 2 == 0;\n});\n// => [4, 9]\n\n_.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n  (result[value] || (result[value] = [])).push(key);\n});\n// => { '1': ['a', 'c'], '2': ['b'] }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/unset", - "html":"

    unset source npm

    \n
    _.unset(object, path)
    \n\n

    Removes the property at path of object.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to modify.

      \n
    2. \n
    3. path (Array|string)

      The path of the property to unset.

      \n
    4. \n
    \n

    返回值 (boolean)

    \n

    Returns true if the property is deleted否则返回 false

    \n
    \n

    示例

    \n
    var object = { 'a': [{ 'b': { 'c': 7 } }] };\n_.unset(object, 'a[0].b.c');\n// => true\n\nconsole.log(object);\n// => { 'a': [{ 'b': {} }] };\n\n_.unset(object, 'a[0].b.c');\n// => true\n\nconsole.log(object);\n// => { 'a': [{ 'b': {} }] };\n
    \n
    \n
    \n\n
    " } + "html":"

    unset source npm

    \n
    _.unset(object, path)
    \n\n

    Removes the property at path of object.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to modify.

      \n
    2. \n
    3. path (Array|string)

      The path of the property to unset.

      \n
    4. \n
    \n

    返回值 (boolean)

    \n

    Returns true if the property is deleted否则返回 false

    \n
    \n

    示例

    \n
    var object = { 'a': [{ 'b': { 'c': 7 } }] };\n_.unset(object, 'a[0].b.c');\n// => true\n\nconsole.log(object);\n// => { 'a': [{ 'b': {} }] };\n\n_.unset(object, 'a[0].b.c');\n// => true\n\nconsole.log(object);\n// => { 'a': [{ 'b': {} }] };\n
    \n
    \n
    \n\n
    " } ,{ "href":"/values", - "html":"

    values source npm

    \n
    _.values(object)
    \n\n

    Creates an array of the own enumerable property values of object.\n
    \n
    \n注意: Non-object values are coerced to objects.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to query.

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    Returns the array of property values.

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.values(new Foo);\n// => [1, 2] (无法保证遍历的顺序)\n\n_.values('hi');\n// => ['h', 'i']\n
    \n
    \n
    \n\n
    " } + "html":"

    values source npm

    \n
    _.values(object)
    \n\n

    Creates an array of the own enumerable property values of object.\n
    \n
    \n注意: Non-object values are coerced to objects.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要检索的对象

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    Returns the array of property values.

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.values(new Foo);\n// => [1, 2] (无法保证遍历的顺序)\n\n_.values('hi');\n// => ['h', 'i']\n
    \n
    \n
    \n\n
    " } ,{ "href":"/valuesIn", - "html":"

    valuesIn source npm

    \n
    _.valuesIn(object)
    \n\n

    Creates an array of the own and inherited enumerable property values of object.\n
    \n
    \n注意: Non-object values are coerced to objects.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to query.

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    Returns the array of property values.

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.valuesIn(new Foo);\n// => [1, 2, 3] (无法保证遍历的顺序)\n
    \n
    \n
    \n\n
    " } + "html":"

    valuesIn source npm

    \n
    _.valuesIn(object)
    \n\n

    Creates an array of the own and inherited enumerable property values of object.\n
    \n
    \n注意: Non-object values are coerced to objects.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要检索的对象

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    Returns the array of property values.

    \n
    \n

    示例

    \n
    function Foo() {\n  this.a = 1;\n  this.b = 2;\n}\n\nFoo.prototype.c = 3;\n\n_.valuesIn(new Foo);\n// => [1, 2, 3] (无法保证遍历的顺序)\n
    \n
    \n
    \n\n
    " } ,{ "href":"/templateSettings", "html":"

    templateSettings source npm

    \n
    _.templateSettings
    \n\n

    (Object): By default, the template delimiters used by lodash are like those in\nembedded Ruby (ERB). Change the following template settings to use\nalternative delimiters.

    \n
    \n\n
    \n\n
    " } ,{ "href":"/templateSettings-escape", @@ -465,121 +465,121 @@ ,{ "href":"/templateSettings-variable", "html":"

    templateSettings.variable source

    \n
    _.templateSettings.variable
    \n\n

    (string): Used to reference the data object in the template text.

    \n
    \n\n
    \n\n
    " } ,{ "href":"/VERSION", - "html":"

    VERSION source

    \n
    _.VERSION
    \n\n

    (string): The semantic version number.

    \n
    \n\n
    \n\n
    " } + "html":"

    VERSION source

    \n
    _.VERSION
    \n\n

    (string): The semantic version number.

    \n
    \n\n
    \n\n
    " } ,{ "href":"/camelCase", - "html":"

    camelCase source npm

    \n
    _.camelCase([string=''])
    \n\n

    Converts string to camel case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the camel cased string.

    \n
    \n

    示例

    \n
    _.camelCase('Foo Bar');\n// => 'fooBar'\n\n_.camelCase('--foo-bar');\n// => 'fooBar'\n\n_.camelCase('__foo_bar__');\n// => 'fooBar'\n
    \n
    \n
    \n\n
    " } + "html":"

    camelCase source npm

    \n
    _.camelCase([string=''])
    \n\n

    Converts string to camel case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the camel cased string.

    \n
    \n

    示例

    \n
    _.camelCase('Foo Bar');\n// => 'fooBar'\n\n_.camelCase('--foo-bar');\n// => 'fooBar'\n\n_.camelCase('__foo_bar__');\n// => 'fooBar'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/capitalize", - "html":"

    capitalize source npm

    \n
    _.capitalize([string=''])
    \n\n

    Converts the first character of string to upper case and the remaining\nto lower case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to capitalize.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the capitalized string.

    \n
    \n

    示例

    \n
    _.capitalize('FRED');\n// => 'Fred'\n
    \n
    \n
    \n\n
    " } + "html":"

    capitalize source npm

    \n
    _.capitalize([string=''])
    \n\n

    Converts the first character of string to upper case and the remaining\nto lower case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to capitalize.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the capitalized string.

    \n
    \n

    示例

    \n
    _.capitalize('FRED');\n// => 'Fred'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/deburr", - "html":"

    deburr source npm

    \n
    _.deburr([string=''])
    \n\n

    Deburrs string by converting latin-1 supplementary letters#Character_table)\nto basic latin letters and removing combining diacritical marks.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to deburr.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the deburred string.

    \n
    \n

    示例

    \n
    _.deburr('déjà vu');\n// => 'deja vu'\n
    \n
    \n
    \n\n
    " } + "html":"

    deburr source npm

    \n
    _.deburr([string=''])
    \n\n

    Deburrs string by converting latin-1 supplementary letters#Character_table)\nto basic latin letters and removing combining diacritical marks.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to deburr.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the deburred string.

    \n
    \n

    示例

    \n
    _.deburr('déjà vu');\n// => 'deja vu'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/endsWith", - "html":"

    endsWith source npm

    \n
    _.endsWith([string=''], [target], [position=string.length])
    \n\n

    Checks if string ends with the given target string.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to search.

      \n
    2. \n
    3. [target] (string)

      The string to search for.

      \n
    4. \n
    5. [position=string.length] (number)

      The position to search from.

      \n
    6. \n
    \n

    返回值 (boolean)

    \n

    Returns true if string ends with target否则返回 false

    \n
    \n

    示例

    \n
    _.endsWith('abc', 'c');\n// => true\n\n_.endsWith('abc', 'b');\n// => false\n\n_.endsWith('abc', 'b', 2);\n// => true\n
    \n
    \n
    \n\n
    " } + "html":"

    endsWith source npm

    \n
    _.endsWith([string=''], [target], [position=string.length])
    \n\n

    Checks if string ends with the given target string.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to search.

      \n
    2. \n
    3. [target] (string)

      The string to search for.

      \n
    4. \n
    5. [position=string.length] (number)

      The position to search from.

      \n
    6. \n
    \n

    返回值 (boolean)

    \n

    Returns true if string ends with target否则返回 false

    \n
    \n

    示例

    \n
    _.endsWith('abc', 'c');\n// => true\n\n_.endsWith('abc', 'b');\n// => false\n\n_.endsWith('abc', 'b', 2);\n// => true\n
    \n
    \n
    \n\n
    " } ,{ "href":"/escape", - "html":"

    escape source npm

    \n
    _.escape([string=''])
    \n\n

    Converts the characters "&", "<", ">", '"', "'", and "`" in string to\ntheir corresponding HTML entities.\n
    \n
    \n注意: No other characters are escaped. To escape additional\ncharacters use a third-party library like he.\n
    \n
    \nThough the ">" character is escaped for symmetry, characters like\n">" and "/" don't need escaping in HTML and have no special meaning\nunless they're part of a tag or unquoted attribute value.\nSee Mathias Bynens's article\n(under "semi-related fun fact") for more details.\n
    \n
    \nBackticks are escaped because in IE < 9, they can break out of\nattribute values or HTML comments. See #59,\n#102, #108, and\n#133 of the HTML5 Security Cheatsheet\nfor more details.\n
    \n
    \nWhen working with HTML you should always quote attribute values\nto reduce XSS vectors.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to escape.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the escaped string.

    \n
    \n

    示例

    \n
    _.escape('fred, barney, & pebbles');\n// => 'fred, barney, &amp; pebbles'\n
    \n
    \n
    \n\n
    " } + "html":"

    escape source npm

    \n
    _.escape([string=''])
    \n\n

    Converts the characters "&", "<", ">", '"', "'", and "`" in string to\ntheir corresponding HTML entities.\n
    \n
    \n注意: No other characters are escaped. To escape additional\ncharacters use a third-party library like he.\n
    \n
    \nThough the ">" character is escaped for symmetry, characters like\n">" and "/" don't need escaping in HTML and have no special meaning\nunless they're part of a tag or unquoted attribute value.\nSee Mathias Bynens's article\n(under "semi-related fun fact") 了解详情\n
    \n
    \nBackticks are escaped because in IE < 9, they can break out of\nattribute values or HTML comments. See #59,\n#102, #108, and\n#133 of the HTML5 Security Cheatsheet\n了解详情\n
    \n
    \nWhen working with HTML you should always quote attribute values\nto reduce XSS vectors.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to escape.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the escaped string.

    \n
    \n

    示例

    \n
    _.escape('fred, barney, & pebbles');\n// => 'fred, barney, &amp; pebbles'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/escapeRegExp", - "html":"

    escapeRegExp source npm

    \n
    _.escapeRegExp([string=''])
    \n\n

    Escapes the RegExp special characters "^", "$", "\\", ".", "*", "+",\n"?", "(", ")", "[", "]", "{", "}", and "|" in string.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to escape.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the escaped string.

    \n
    \n

    示例

    \n
    _.escapeRegExp('[lodash](https://lodash.com/)');\n// => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n
    \n
    \n
    \n\n
    " } + "html":"

    escapeRegExp source npm

    \n
    _.escapeRegExp([string=''])
    \n\n

    Escapes the RegExp special characters "^", "$", "\\", ".", "*", "+",\n"?", "(", ")", "[", "]", "{", "}", and "|" in string.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to escape.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the escaped string.

    \n
    \n

    示例

    \n
    _.escapeRegExp('[lodash](https://lodash.com/)');\n// => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/kebabCase", - "html":"

    kebabCase source npm

    \n
    _.kebabCase([string=''])
    \n\n

    Converts string to kebab case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the kebab cased string.

    \n
    \n

    示例

    \n
    _.kebabCase('Foo Bar');\n// => 'foo-bar'\n\n_.kebabCase('fooBar');\n// => 'foo-bar'\n\n_.kebabCase('__foo_bar__');\n// => 'foo-bar'\n
    \n
    \n
    \n\n
    " } + "html":"

    kebabCase source npm

    \n
    _.kebabCase([string=''])
    \n\n

    Converts string to kebab case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the kebab cased string.

    \n
    \n

    示例

    \n
    _.kebabCase('Foo Bar');\n// => 'foo-bar'\n\n_.kebabCase('fooBar');\n// => 'foo-bar'\n\n_.kebabCase('__foo_bar__');\n// => 'foo-bar'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/lowerCase", - "html":"

    lowerCase source npm

    \n
    _.lowerCase([string=''])
    \n\n

    Converts string, as space separated words, to lower case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the lower cased string.

    \n
    \n

    示例

    \n
    _.lowerCase('--Foo-Bar');\n// => 'foo bar'\n\n_.lowerCase('fooBar');\n// => 'foo bar'\n\n_.lowerCase('__FOO_BAR__');\n// => 'foo bar'\n
    \n
    \n
    \n\n
    " } + "html":"

    lowerCase source npm

    \n
    _.lowerCase([string=''])
    \n\n

    Converts string, as space separated words, to lower case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the lower cased string.

    \n
    \n

    示例

    \n
    _.lowerCase('--Foo-Bar');\n// => 'foo bar'\n\n_.lowerCase('fooBar');\n// => 'foo bar'\n\n_.lowerCase('__FOO_BAR__');\n// => 'foo bar'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/lowerFirst", - "html":"

    lowerFirst source npm

    \n
    _.lowerFirst([string=''])
    \n\n

    Converts the first character of string to lower case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the converted string.

    \n
    \n

    示例

    \n
    _.lowerFirst('Fred');\n// => 'fred'\n\n_.lowerFirst('FRED');\n// => 'fRED'\n
    \n
    \n
    \n\n
    " } + "html":"

    lowerFirst source npm

    \n
    _.lowerFirst([string=''])
    \n\n

    Converts the first character of string to lower case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the converted string.

    \n
    \n

    示例

    \n
    _.lowerFirst('Fred');\n// => 'fred'\n\n_.lowerFirst('FRED');\n// => 'fRED'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/pad", - "html":"

    pad source npm

    \n
    _.pad([string=''], [length=0], [chars=' '])
    \n\n

    Pads string on the left and right sides if it's shorter than length.\nPadding characters are truncated if they can't be evenly divided by length.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to pad.

      \n
    2. \n
    3. [length=0] (number)

      The padding length.

      \n
    4. \n
    5. [chars=' '] (string)

      The string used as padding.

      \n
    6. \n
    \n

    返回值 (string)

    \n

    Returns the padded string.

    \n
    \n

    示例

    \n
    _.pad('abc', 8);\n// => '  abc   '\n\n_.pad('abc', 8, '_-');\n// => '_-abc_-_'\n\n_.pad('abc', 3);\n// => 'abc'\n
    \n
    \n
    \n\n
    " } + "html":"

    pad source npm

    \n
    _.pad([string=''], [length=0], [chars=' '])
    \n\n

    Pads string on the left and right sides if it's shorter than length.\nPadding characters are truncated if they can't be evenly divided by length.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to pad.

      \n
    2. \n
    3. [length=0] (number)

      The padding length.

      \n
    4. \n
    5. [chars=' '] (string)

      The string used as padding.

      \n
    6. \n
    \n

    返回值 (string)

    \n

    Returns the padded string.

    \n
    \n

    示例

    \n
    _.pad('abc', 8);\n// => '  abc   '\n\n_.pad('abc', 8, '_-');\n// => '_-abc_-_'\n\n_.pad('abc', 3);\n// => 'abc'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/padEnd", - "html":"

    padEnd source npm

    \n
    _.padEnd([string=''], [length=0], [chars=' '])
    \n\n

    Pads string on the right side if it's shorter than length. Padding\ncharacters are truncated if they exceed length.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to pad.

      \n
    2. \n
    3. [length=0] (number)

      The padding length.

      \n
    4. \n
    5. [chars=' '] (string)

      The string used as padding.

      \n
    6. \n
    \n

    返回值 (string)

    \n

    Returns the padded string.

    \n
    \n

    示例

    \n
    _.padEnd('abc', 6);\n// => 'abc   '\n\n_.padEnd('abc', 6, '_-');\n// => 'abc_-_'\n\n_.padEnd('abc', 3);\n// => 'abc'\n
    \n
    \n
    \n\n
    " } + "html":"

    padEnd source npm

    \n
    _.padEnd([string=''], [length=0], [chars=' '])
    \n\n

    Pads string on the right side if it's shorter than length. Padding\ncharacters are truncated if they exceed length.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to pad.

      \n
    2. \n
    3. [length=0] (number)

      The padding length.

      \n
    4. \n
    5. [chars=' '] (string)

      The string used as padding.

      \n
    6. \n
    \n

    返回值 (string)

    \n

    Returns the padded string.

    \n
    \n

    示例

    \n
    _.padEnd('abc', 6);\n// => 'abc   '\n\n_.padEnd('abc', 6, '_-');\n// => 'abc_-_'\n\n_.padEnd('abc', 3);\n// => 'abc'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/padStart", - "html":"

    padStart source npm

    \n
    _.padStart([string=''], [length=0], [chars=' '])
    \n\n

    Pads string on the left side if it's shorter than length. Padding\ncharacters are truncated if they exceed length.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to pad.

      \n
    2. \n
    3. [length=0] (number)

      The padding length.

      \n
    4. \n
    5. [chars=' '] (string)

      The string used as padding.

      \n
    6. \n
    \n

    返回值 (string)

    \n

    Returns the padded string.

    \n
    \n

    示例

    \n
    _.padStart('abc', 6);\n// => '   abc'\n\n_.padStart('abc', 6, '_-');\n// => '_-_abc'\n\n_.padStart('abc', 3);\n// => 'abc'\n
    \n
    \n
    \n\n
    " } + "html":"

    padStart source npm

    \n
    _.padStart([string=''], [length=0], [chars=' '])
    \n\n

    Pads string on the left side if it's shorter than length. Padding\ncharacters are truncated if they exceed length.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to pad.

      \n
    2. \n
    3. [length=0] (number)

      The padding length.

      \n
    4. \n
    5. [chars=' '] (string)

      The string used as padding.

      \n
    6. \n
    \n

    返回值 (string)

    \n

    Returns the padded string.

    \n
    \n

    示例

    \n
    _.padStart('abc', 6);\n// => '   abc'\n\n_.padStart('abc', 6, '_-');\n// => '_-_abc'\n\n_.padStart('abc', 3);\n// => 'abc'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/parseInt", - "html":"

    parseInt source npm

    \n
    _.parseInt(string, [radix])
    \n\n

    Converts string to an integer of the specified radix. If radix is\nundefined or 0, a radix of 10 is used unless value is a hexadecimal,\nin which case a radix of 16 is used.\n
    \n
    \n注意: This method aligns with the ES5 implementation\nof parseInt.

    \n
    \n\n

    参数

    \n
      \n
    1. string (string)

      The string to convert.

      \n
    2. \n
    3. [radix] (number)

      The radix to interpret value by.

      \n
    4. \n
    \n

    返回值 (number)

    \n

    Returns the converted integer.

    \n
    \n

    示例

    \n
    _.parseInt('08');\n// => 8\n\n_.map(['6', '08', '10'], _.parseInt);\n// => [6, 8, 10]\n
    \n
    \n
    \n\n
    " } + "html":"

    parseInt source npm

    \n
    _.parseInt(string, [radix])
    \n\n

    Converts string to an integer of the specified radix. If radix is\nundefined or 0, a radix of 10 is used unless value is a hexadecimal,\nin which case a radix of 16 is used.\n
    \n
    \n注意: This method aligns with the ES5 implementation\nof parseInt.

    \n
    \n\n

    参数

    \n
      \n
    1. string (string)

      The string to convert.

      \n
    2. \n
    3. [radix] (number)

      The radix to interpret value by.

      \n
    4. \n
    \n

    返回值 (number)

    \n

    Returns the converted integer.

    \n
    \n

    示例

    \n
    _.parseInt('08');\n// => 8\n\n_.map(['6', '08', '10'], _.parseInt);\n// => [6, 8, 10]\n
    \n
    \n
    \n\n
    " } ,{ "href":"/repeat", - "html":"

    repeat source npm

    \n
    _.repeat([string=''], [n=0])
    \n\n

    Repeats the given string n times.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to repeat.

      \n
    2. \n
    3. [n=0] (number)

      The number of times to repeat the string.

      \n
    4. \n
    \n

    返回值 (string)

    \n

    Returns the repeated string.

    \n
    \n

    示例

    \n
    _.repeat('*', 3);\n// => '***'\n\n_.repeat('abc', 2);\n// => 'abcabc'\n\n_.repeat('abc', 0);\n// => ''\n
    \n
    \n
    \n\n
    " } + "html":"

    repeat source npm

    \n
    _.repeat([string=''], [n=0])
    \n\n

    Repeats the given string n times.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to repeat.

      \n
    2. \n
    3. [n=0] (number)

      The number of times to repeat the string.

      \n
    4. \n
    \n

    返回值 (string)

    \n

    Returns the repeated string.

    \n
    \n

    示例

    \n
    _.repeat('*', 3);\n// => '***'\n\n_.repeat('abc', 2);\n// => 'abcabc'\n\n_.repeat('abc', 0);\n// => ''\n
    \n
    \n
    \n\n
    " } ,{ "href":"/replace", - "html":"

    replace source npm

    \n
    _.replace([string=''], pattern, replacement)
    \n\n

    Replaces matches for pattern in string with replacement.\n
    \n
    \n注意: This method is based on String#replace.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to modify.

      \n
    2. \n
    3. pattern (RegExp|string)

      The pattern to replace.

      \n
    4. \n
    5. replacement (Function|string)

      The match replacement.

      \n
    6. \n
    \n

    返回值 (string)

    \n

    Returns the modified string.

    \n
    \n

    示例

    \n
    _.replace('Hi Fred', 'Fred', 'Barney');\n// => 'Hi Barney'\n
    \n
    \n
    \n\n
    " } + "html":"

    replace source npm

    \n
    _.replace([string=''], pattern, replacement)
    \n\n

    Replaces matches for pattern in string with replacement.\n
    \n
    \n注意: This method is based on String#replace.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to modify.

      \n
    2. \n
    3. pattern (RegExp|string)

      The pattern to replace.

      \n
    4. \n
    5. replacement (Function|string)

      The match replacement.

      \n
    6. \n
    \n

    返回值 (string)

    \n

    Returns the modified string.

    \n
    \n

    示例

    \n
    _.replace('Hi Fred', 'Fred', 'Barney');\n// => 'Hi Barney'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/snakeCase", - "html":"

    snakeCase source npm

    \n
    _.snakeCase([string=''])
    \n\n

    Converts string to snake case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the snake cased string.

    \n
    \n

    示例

    \n
    _.snakeCase('Foo Bar');\n// => 'foo_bar'\n\n_.snakeCase('fooBar');\n// => 'foo_bar'\n\n_.snakeCase('--foo-bar');\n// => 'foo_bar'\n
    \n
    \n
    \n\n
    " } + "html":"

    snakeCase source npm

    \n
    _.snakeCase([string=''])
    \n\n

    Converts string to snake case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the snake cased string.

    \n
    \n

    示例

    \n
    _.snakeCase('Foo Bar');\n// => 'foo_bar'\n\n_.snakeCase('fooBar');\n// => 'foo_bar'\n\n_.snakeCase('--foo-bar');\n// => 'foo_bar'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/split", - "html":"

    split source npm

    \n
    _.split([string=''], separator, [limit])
    \n\n

    Splits string by separator.\n
    \n
    \n注意: This method is based on String#split.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to split.

      \n
    2. \n
    3. separator (RegExp|string)

      The separator pattern to split by.

      \n
    4. \n
    5. [limit] (number)

      The length to truncate results to.

      \n
    6. \n
    \n

    返回值 (Array)

    \n

    Returns the new array of string segments.

    \n
    \n

    示例

    \n
    _.split('a-b-c', '-', 2);\n// => ['a', 'b']\n
    \n
    \n
    \n\n
    " } + "html":"

    split source npm

    \n
    _.split([string=''], separator, [limit])
    \n\n

    Splits string by separator.\n
    \n
    \n注意: This method is based on String#split.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to split.

      \n
    2. \n
    3. separator (RegExp|string)

      The separator pattern to split by.

      \n
    4. \n
    5. [limit] (number)

      The length to truncate results to.

      \n
    6. \n
    \n

    返回值 (Array)

    \n

    Returns the new array of string segments.

    \n
    \n

    示例

    \n
    _.split('a-b-c', '-', 2);\n// => ['a', 'b']\n
    \n
    \n
    \n\n
    " } ,{ "href":"/startCase", - "html":"

    startCase source npm

    \n
    _.startCase([string=''])
    \n\n

    Converts string to start case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the start cased string.

    \n
    \n

    示例

    \n
    _.startCase('--foo-bar');\n// => 'Foo Bar'\n\n_.startCase('fooBar');\n// => 'Foo Bar'\n\n_.startCase('__foo_bar__');\n// => 'Foo Bar'\n
    \n
    \n
    \n\n
    " } + "html":"

    startCase source npm

    \n
    _.startCase([string=''])
    \n\n

    Converts string to start case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the start cased string.

    \n
    \n

    示例

    \n
    _.startCase('--foo-bar');\n// => 'Foo Bar'\n\n_.startCase('fooBar');\n// => 'Foo Bar'\n\n_.startCase('__foo_bar__');\n// => 'Foo Bar'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/startsWith", - "html":"

    startsWith source npm

    \n
    _.startsWith([string=''], [target], [position=0])
    \n\n

    Checks if string starts with the given target string.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to search.

      \n
    2. \n
    3. [target] (string)

      The string to search for.

      \n
    4. \n
    5. [position=0] (number)

      The position to search from.

      \n
    6. \n
    \n

    返回值 (boolean)

    \n

    Returns true if string starts with target否则返回 false

    \n
    \n

    示例

    \n
    _.startsWith('abc', 'a');\n// => true\n\n_.startsWith('abc', 'b');\n// => false\n\n_.startsWith('abc', 'b', 1);\n// => true\n
    \n
    \n
    \n\n
    " } + "html":"

    startsWith source npm

    \n
    _.startsWith([string=''], [target], [position=0])
    \n\n

    Checks if string starts with the given target string.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to search.

      \n
    2. \n
    3. [target] (string)

      The string to search for.

      \n
    4. \n
    5. [position=0] (number)

      The position to search from.

      \n
    6. \n
    \n

    返回值 (boolean)

    \n

    Returns true if string starts with target否则返回 false

    \n
    \n

    示例

    \n
    _.startsWith('abc', 'a');\n// => true\n\n_.startsWith('abc', 'b');\n// => false\n\n_.startsWith('abc', 'b', 1);\n// => true\n
    \n
    \n
    \n\n
    " } ,{ "href":"/template", - "html":"

    template source npm

    \n
    _.template([string=''], [options])
    \n\n

    Creates a compiled template function that can interpolate data properties\nin "interpolate" delimiters, HTML-escape interpolated data properties in\n"escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data\nproperties may be accessed as free variables in the template. If a setting\nobject is provided it takes precedence over _.templateSettings values.\n
    \n
    \n注意: In the development build _.template utilizes\nsourceURLs\nfor easier debugging.\n
    \n
    \nFor more information on precompiling templates see\nlodash's custom builds documentation.\n
    \n
    \nFor more information on Chrome extension sandboxes see\nChrome's extensions documentation.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The template string.

      \n
    2. \n
    3. [options] (Object)

      The options object.

      \n
    4. \n
    5. [options.escape] (RegExp)

      The HTML "escape" delimiter.

      \n
    6. \n
    7. [options.evaluate] (RegExp)

      The "evaluate" delimiter.

      \n
    8. \n
    9. [options.imports] (Object)

      An object to import into the template as free variables.

      \n
    10. \n
    11. [options.interpolate] (RegExp)

      The "interpolate" delimiter.

      \n
    12. \n
    13. [options.sourceURL] (string)

      The sourceURL of the template's compiled source.

      \n
    14. \n
    15. [options.variable] (string)

      The data object variable name.

      \n
    16. \n
    \n

    返回值 (Function)

    \n

    Returns the compiled template function.

    \n
    \n

    示例

    \n
    // using the \"interpolate\" delimiter to create a compiled template\nvar compiled = _.template('hello <%= user %>!');\ncompiled({ 'user': 'fred' });\n// => 'hello fred!'\n\n// using the HTML \"escape\" delimiter to escape data property values\nvar compiled = _.template('<b><%- value %></b>');\ncompiled({ 'value': '<script>' });\n// => '<b>&lt;script&gt;</b>'\n\n// using the \"evaluate\" delimiter to execute JavaScript and generate HTML\nvar compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\ncompiled({ 'users': ['fred', 'barney'] });\n// => '<li>fred</li><li>barney</li>'\n\n// using the internal `print` function in \"evaluate\" delimiters\nvar compiled = _.template('<% print(\"hello \" + user); %>!');\ncompiled({ 'user': 'barney' });\n// => 'hello barney!'\n\n// using the ES delimiter as an alternative to the default \"interpolate\" delimiter\nvar compiled = _.template('hello ${ user }!');\ncompiled({ 'user': 'pebbles' });\n// => 'hello pebbles!'\n\n// using custom template delimiters\n_.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\nvar compiled = _.template('hello {{ user }}!');\ncompiled({ 'user': 'mustache' });\n// => 'hello mustache!'\n\n// using backslashes to treat delimiters as plain text\nvar compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\ncompiled({ 'value': 'ignored' });\n// => '<%- value %>'\n\n// using the `imports` option to import `jQuery` as `jq`\nvar text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\nvar compiled = _.template(text, { 'imports': { 'jq': jQuery } });\ncompiled({ 'users': ['fred', 'barney'] });\n// => '<li>fred</li><li>barney</li>'\n\n// using the `sourceURL` option to specify a custom sourceURL for the template\nvar compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\ncompiled(data);\n// => find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector\n\n// using the `variable` option to ensure a with-statement isn't used in the compiled template\nvar compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\ncompiled.source;\n// => function(data) {\n//   var __t, __p = '';\n//   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n//   return __p;\n// }\n\n// using the `source` property to inline compiled templates for meaningful\n// line numbers in error messages and a stack trace\nfs.writeFileSync(path.join(cwd, 'jst.js'), '\\\n  var JST = {\\\n    \"main\": ' + _.template(mainText).source + '\\\n  };\\\n');\n
    \n
    \n
    \n\n
    " } + "html":"

    template source npm

    \n
    _.template([string=''], [options])
    \n\n

    Creates a compiled template function that can interpolate data properties\nin "interpolate" delimiters, HTML-escape interpolated data properties in\n"escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data\nproperties may be accessed as free variables in the template. If a setting\nobject is provided it takes precedence over _.templateSettings values.\n
    \n
    \n注意: In the development build _.template utilizes\nsourceURLs\nfor easier debugging.\n
    \n
    \nFor more information on precompiling templates see\nlodash's custom builds documentation.\n
    \n
    \nFor more information on Chrome extension sandboxes see\nChrome's extensions documentation.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The template string.

      \n
    2. \n
    3. [options] (Object)

      The options object.

      \n
    4. \n
    5. [options.escape] (RegExp)

      The HTML "escape" delimiter.

      \n
    6. \n
    7. [options.evaluate] (RegExp)

      The "evaluate" delimiter.

      \n
    8. \n
    9. [options.imports] (Object)

      An object to import into the template as free variables.

      \n
    10. \n
    11. [options.interpolate] (RegExp)

      The "interpolate" delimiter.

      \n
    12. \n
    13. [options.sourceURL] (string)

      The sourceURL of the template's compiled source.

      \n
    14. \n
    15. [options.variable] (string)

      The data object variable name.

      \n
    16. \n
    \n

    返回值 (Function)

    \n

    Returns the compiled template function.

    \n
    \n

    示例

    \n
    // using the \"interpolate\" delimiter to create a compiled template\nvar compiled = _.template('hello <%= user %>!');\ncompiled({ 'user': 'fred' });\n// => 'hello fred!'\n\n// using the HTML \"escape\" delimiter to escape data property values\nvar compiled = _.template('<b><%- value %></b>');\ncompiled({ 'value': '<script>' });\n// => '<b>&lt;script&gt;</b>'\n\n// using the \"evaluate\" delimiter to execute JavaScript and generate HTML\nvar compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\ncompiled({ 'users': ['fred', 'barney'] });\n// => '<li>fred</li><li>barney</li>'\n\n// using the internal `print` function in \"evaluate\" delimiters\nvar compiled = _.template('<% print(\"hello \" + user); %>!');\ncompiled({ 'user': 'barney' });\n// => 'hello barney!'\n\n// using the ES delimiter as an alternative to the default \"interpolate\" delimiter\nvar compiled = _.template('hello ${ user }!');\ncompiled({ 'user': 'pebbles' });\n// => 'hello pebbles!'\n\n// using custom template delimiters\n_.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\nvar compiled = _.template('hello {{ user }}!');\ncompiled({ 'user': 'mustache' });\n// => 'hello mustache!'\n\n// using backslashes to treat delimiters as plain text\nvar compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\ncompiled({ 'value': 'ignored' });\n// => '<%- value %>'\n\n// using the `imports` option to import `jQuery` as `jq`\nvar text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\nvar compiled = _.template(text, { 'imports': { 'jq': jQuery } });\ncompiled({ 'users': ['fred', 'barney'] });\n// => '<li>fred</li><li>barney</li>'\n\n// using the `sourceURL` option to specify a custom sourceURL for the template\nvar compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\ncompiled(data);\n// => find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector\n\n// using the `variable` option to ensure a with-statement isn't used in the compiled template\nvar compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\ncompiled.source;\n// => function(data) {\n//   var __t, __p = '';\n//   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n//   return __p;\n// }\n\n// using the `source` property to inline compiled templates for meaningful\n// line numbers in error messages and a stack trace\nfs.writeFileSync(path.join(cwd, 'jst.js'), '\\\n  var JST = {\\\n    \"main\": ' + _.template(mainText).source + '\\\n  };\\\n');\n
    \n
    \n
    \n\n
    " } ,{ "href":"/toLower", - "html":"

    toLower source npm

    \n
    _.toLower([string=''])
    \n\n

    Converts string, as a whole, to lower case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the lower cased string.

    \n
    \n

    示例

    \n
    _.toLower('--Foo-Bar');\n// => '--foo-bar'\n\n_.toLower('fooBar');\n// => 'foobar'\n\n_.toLower('__FOO_BAR__');\n// => '__foo_bar__'\n
    \n
    \n
    \n\n
    " } + "html":"

    toLower source npm

    \n
    _.toLower([string=''])
    \n\n

    Converts string, as a whole, to lower case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the lower cased string.

    \n
    \n

    示例

    \n
    _.toLower('--Foo-Bar');\n// => '--foo-bar'\n\n_.toLower('fooBar');\n// => 'foobar'\n\n_.toLower('__FOO_BAR__');\n// => '__foo_bar__'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/toUpper", - "html":"

    toUpper source npm

    \n
    _.toUpper([string=''])
    \n\n

    Converts string, as a whole, to upper case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the upper cased string.

    \n
    \n

    示例

    \n
    _.toUpper('--foo-bar');\n// => '--FOO-BAR'\n\n_.toUpper('fooBar');\n// => 'FOOBAR'\n\n_.toUpper('__foo_bar__');\n// => '__FOO_BAR__'\n
    \n
    \n
    \n\n
    " } + "html":"

    toUpper source npm

    \n
    _.toUpper([string=''])
    \n\n

    Converts string, as a whole, to upper case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the upper cased string.

    \n
    \n

    示例

    \n
    _.toUpper('--foo-bar');\n// => '--FOO-BAR'\n\n_.toUpper('fooBar');\n// => 'FOOBAR'\n\n_.toUpper('__foo_bar__');\n// => '__FOO_BAR__'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/trim", - "html":"

    trim source npm

    \n
    _.trim([string=''], [chars=whitespace])
    \n\n

    Removes leading and trailing whitespace or specified characters from string.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to trim.

      \n
    2. \n
    3. [chars=whitespace] (string)

      The characters to trim.

      \n
    4. \n
    \n

    返回值 (string)

    \n

    Returns the trimmed string.

    \n
    \n

    示例

    \n
    _.trim('  abc  ');\n// => 'abc'\n\n_.trim('-_-abc-_-', '_-');\n// => 'abc'\n\n_.map(['  foo  ', '  bar  '], _.trim);\n// => ['foo', 'bar']\n
    \n
    \n
    \n\n
    " } + "html":"

    trim source npm

    \n
    _.trim([string=''], [chars=whitespace])
    \n\n

    Removes leading and trailing whitespace or specified characters from string.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to trim.

      \n
    2. \n
    3. [chars=whitespace] (string)

      The characters to trim.

      \n
    4. \n
    \n

    返回值 (string)

    \n

    Returns the trimmed string.

    \n
    \n

    示例

    \n
    _.trim('  abc  ');\n// => 'abc'\n\n_.trim('-_-abc-_-', '_-');\n// => 'abc'\n\n_.map(['  foo  ', '  bar  '], _.trim);\n// => ['foo', 'bar']\n
    \n
    \n
    \n\n
    " } ,{ "href":"/trimEnd", - "html":"

    trimEnd source npm

    \n
    _.trimEnd([string=''], [chars=whitespace])
    \n\n

    Removes trailing whitespace or specified characters from string.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to trim.

      \n
    2. \n
    3. [chars=whitespace] (string)

      The characters to trim.

      \n
    4. \n
    \n

    返回值 (string)

    \n

    Returns the trimmed string.

    \n
    \n

    示例

    \n
    _.trimEnd('  abc  ');\n// => '  abc'\n\n_.trimEnd('-_-abc-_-', '_-');\n// => '-_-abc'\n
    \n
    \n
    \n\n
    " } + "html":"

    trimEnd source npm

    \n
    _.trimEnd([string=''], [chars=whitespace])
    \n\n

    Removes trailing whitespace or specified characters from string.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to trim.

      \n
    2. \n
    3. [chars=whitespace] (string)

      The characters to trim.

      \n
    4. \n
    \n

    返回值 (string)

    \n

    Returns the trimmed string.

    \n
    \n

    示例

    \n
    _.trimEnd('  abc  ');\n// => '  abc'\n\n_.trimEnd('-_-abc-_-', '_-');\n// => '-_-abc'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/trimStart", - "html":"

    trimStart source npm

    \n
    _.trimStart([string=''], [chars=whitespace])
    \n\n

    Removes leading whitespace or specified characters from string.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to trim.

      \n
    2. \n
    3. [chars=whitespace] (string)

      The characters to trim.

      \n
    4. \n
    \n

    返回值 (string)

    \n

    Returns the trimmed string.

    \n
    \n

    示例

    \n
    _.trimStart('  abc  ');\n// => 'abc  '\n\n_.trimStart('-_-abc-_-', '_-');\n// => 'abc-_-'\n
    \n
    \n
    \n\n
    " } + "html":"

    trimStart source npm

    \n
    _.trimStart([string=''], [chars=whitespace])
    \n\n

    Removes leading whitespace or specified characters from string.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to trim.

      \n
    2. \n
    3. [chars=whitespace] (string)

      The characters to trim.

      \n
    4. \n
    \n

    返回值 (string)

    \n

    Returns the trimmed string.

    \n
    \n

    示例

    \n
    _.trimStart('  abc  ');\n// => 'abc  '\n\n_.trimStart('-_-abc-_-', '_-');\n// => 'abc-_-'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/truncate", - "html":"

    truncate source npm

    \n
    _.truncate([string=''], [options])
    \n\n

    Truncates string if it's longer than the given maximum string length.\nThe last characters of the truncated string are replaced with the omission\nstring which defaults to "...".

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to truncate.

      \n
    2. \n
    3. [options] (Object)

      The options object.

      \n
    4. \n
    5. [options.length=30] (number)

      The maximum string length.

      \n
    6. \n
    7. [options.omission='...'] (string)

      The string to indicate text is omitted.

      \n
    8. \n
    9. [options.separator] (RegExp|string)

      The separator pattern to truncate to.

      \n
    10. \n
    \n

    返回值 (string)

    \n

    Returns the truncated string.

    \n
    \n

    示例

    \n
    _.truncate('hi-diddly-ho there, neighborino');\n// => 'hi-diddly-ho there, neighbo...'\n\n_.truncate('hi-diddly-ho there, neighborino', {\n  'length': 24,\n  'separator': ' '\n});\n// => 'hi-diddly-ho there,...'\n\n_.truncate('hi-diddly-ho there, neighborino', {\n  'length': 24,\n  'separator': /,? +/\n});\n// => 'hi-diddly-ho there...'\n\n_.truncate('hi-diddly-ho there, neighborino', {\n  'omission': ' [...]'\n});\n// => 'hi-diddly-ho there, neig [...]'\n
    \n
    \n
    \n\n
    " } + "html":"

    truncate source npm

    \n
    _.truncate([string=''], [options])
    \n\n

    Truncates string if it's longer than the given maximum string length.\nThe last characters of the truncated string are replaced with the omission\nstring which defaults to "...".

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to truncate.

      \n
    2. \n
    3. [options] (Object)

      The options object.

      \n
    4. \n
    5. [options.length=30] (number)

      The maximum string length.

      \n
    6. \n
    7. [options.omission='...'] (string)

      The string to indicate text is omitted.

      \n
    8. \n
    9. [options.separator] (RegExp|string)

      The separator pattern to truncate to.

      \n
    10. \n
    \n

    返回值 (string)

    \n

    Returns the truncated string.

    \n
    \n

    示例

    \n
    _.truncate('hi-diddly-ho there, neighborino');\n// => 'hi-diddly-ho there, neighbo...'\n\n_.truncate('hi-diddly-ho there, neighborino', {\n  'length': 24,\n  'separator': ' '\n});\n// => 'hi-diddly-ho there,...'\n\n_.truncate('hi-diddly-ho there, neighborino', {\n  'length': 24,\n  'separator': /,? +/\n});\n// => 'hi-diddly-ho there...'\n\n_.truncate('hi-diddly-ho there, neighborino', {\n  'omission': ' [...]'\n});\n// => 'hi-diddly-ho there, neig [...]'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/unescape", - "html":"

    unescape source npm

    \n
    _.unescape([string=''])
    \n\n

    The inverse of _.escape; this method converts the HTML entities\n&amp;, &lt;, &gt;, &quot;, &#39;, and &#96; in string to their\ncorresponding characters.\n
    \n
    \n注意: No other HTML entities are unescaped. To unescape additional HTML\nentities use a third-party library like he.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to unescape.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the unescaped string.

    \n
    \n

    示例

    \n
    _.unescape('fred, barney, &amp; pebbles');\n// => 'fred, barney, & pebbles'\n
    \n
    \n
    \n\n
    " } + "html":"

    unescape source npm

    \n
    _.unescape([string=''])
    \n\n

    The inverse of _.escape; this method converts the HTML entities\n&amp;, &lt;, &gt;, &quot;, &#39;, and &#96; in string to their\ncorresponding characters.\n
    \n
    \n注意: No other HTML entities are unescaped. To unescape additional HTML\nentities use a third-party library like he.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to unescape.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the unescaped string.

    \n
    \n

    示例

    \n
    _.unescape('fred, barney, &amp; pebbles');\n// => 'fred, barney, & pebbles'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/upperCase", - "html":"

    upperCase source npm

    \n
    _.upperCase([string=''])
    \n\n

    Converts string, as space separated words, to upper case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the upper cased string.

    \n
    \n

    示例

    \n
    _.upperCase('--foo-bar');\n// => 'FOO BAR'\n\n_.upperCase('fooBar');\n// => 'FOO BAR'\n\n_.upperCase('__foo_bar__');\n// => 'FOO BAR'\n
    \n
    \n
    \n\n
    " } + "html":"

    upperCase source npm

    \n
    _.upperCase([string=''])
    \n\n

    Converts string, as space separated words, to upper case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the upper cased string.

    \n
    \n

    示例

    \n
    _.upperCase('--foo-bar');\n// => 'FOO BAR'\n\n_.upperCase('fooBar');\n// => 'FOO BAR'\n\n_.upperCase('__foo_bar__');\n// => 'FOO BAR'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/upperFirst", - "html":"

    upperFirst source npm

    \n
    _.upperFirst([string=''])
    \n\n

    Converts the first character of string to upper case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the converted string.

    \n
    \n

    示例

    \n
    _.upperFirst('fred');\n// => 'Fred'\n\n_.upperFirst('FRED');\n// => 'FRED'\n
    \n
    \n
    \n\n
    " } + "html":"

    upperFirst source npm

    \n
    _.upperFirst([string=''])
    \n\n

    Converts the first character of string to upper case.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to convert.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the converted string.

    \n
    \n

    示例

    \n
    _.upperFirst('fred');\n// => 'Fred'\n\n_.upperFirst('FRED');\n// => 'FRED'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/words", - "html":"

    words source npm

    \n
    _.words([string=''], [pattern])
    \n\n

    Splits string into an array of its words.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to inspect.

      \n
    2. \n
    3. [pattern] (RegExp|string)

      The pattern to match words.

      \n
    4. \n
    \n

    返回值 (Array)

    \n

    Returns the words of string.

    \n
    \n

    示例

    \n
    _.words('fred, barney, & pebbles');\n// => ['fred', 'barney', 'pebbles']\n\n_.words('fred, barney, & pebbles', /[^, ]+/g);\n// => ['fred', 'barney', '&', 'pebbles']\n
    \n
    \n
    \n\n
    " } + "html":"

    words source npm

    \n
    _.words([string=''], [pattern])
    \n\n

    Splits string into an array of its words.

    \n
    \n\n

    参数

    \n
      \n
    1. [string=''] (string)

      The string to inspect.

      \n
    2. \n
    3. [pattern] (RegExp|string)

      The pattern to match words.

      \n
    4. \n
    \n

    返回值 (Array)

    \n

    Returns the words of string.

    \n
    \n

    示例

    \n
    _.words('fred, barney, & pebbles');\n// => ['fred', 'barney', 'pebbles']\n\n_.words('fred, barney, & pebbles', /[^, ]+/g);\n// => ['fred', 'barney', '&', 'pebbles']\n
    \n
    \n
    \n\n
    " } ,{ "href":"/attempt", - "html":"

    attempt source npm

    \n
    _.attempt(func)
    \n\n

    Attempts to invoke func, returning either the result or the caught error\nobject. Any additional arguments are provided to func when it's invoked.

    \n
    \n\n

    参数

    \n
      \n
    1. func (Function)

      The function to attempt.

      \n
    2. \n
    \n

    返回值 (*)

    \n

    Returns the func result or error object.

    \n
    \n

    示例

    \n
    // avoid throwing errors for invalid selectors\nvar elements = _.attempt(function(selector) {\n  return document.querySelectorAll(selector);\n}, '>_>');\n\nif (_.isError(elements)) {\n  elements = [];\n}\n
    \n
    \n
    \n\n
    " } + "html":"

    attempt source npm

    \n
    _.attempt(func)
    \n\n

    Attempts to invoke func, returning either the result or the caught error\nobject. Any additional arguments are provided to func when it's invoked.

    \n
    \n\n

    参数

    \n
      \n
    1. func (Function)

      The function to attempt.

      \n
    2. \n
    \n

    返回值 (*)

    \n

    Returns the func result or error object.

    \n
    \n

    示例

    \n
    // avoid throwing errors for invalid selectors\nvar elements = _.attempt(function(selector) {\n  return document.querySelectorAll(selector);\n}, '>_>');\n\nif (_.isError(elements)) {\n  elements = [];\n}\n
    \n
    \n
    \n\n
    " } ,{ "href":"/bindAll", - "html":"

    bindAll source npm

    \n
    _.bindAll(object, methodNames)
    \n\n

    Binds methods of an object to the object itself, overwriting the existing\nmethod.\n
    \n
    \n注意: This method doesn't set the "length" property of bound functions.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to bind and assign the bound methods to.

      \n
    2. \n
    3. methodNames (...(string|string[])

      The object method names to bind, specified individually or in arrays.

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    var view = {\n  'label': 'docs',\n  'onClick': function() {\n    console.log('clicked ' + this.label);\n  }\n};\n\n_.bindAll(view, 'onClick');\njQuery(element).on('click', view.onClick);\n// => logs 'clicked docs' when clicked\n
    \n
    \n
    \n\n
    " } + "html":"

    bindAll source npm

    \n
    _.bindAll(object, methodNames)
    \n\n

    Binds methods of an object to the object itself, overwriting the existing\nmethod.\n
    \n
    \n注意: This method doesn't set the "length" property of bound functions.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to bind and assign the bound methods to.

      \n
    2. \n
    3. methodNames (...(string|string[])

      The object method names to bind, specified individually or in arrays.

      \n
    4. \n
    \n

    返回值 (Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    var view = {\n  'label': 'docs',\n  'onClick': function() {\n    console.log('clicked ' + this.label);\n  }\n};\n\n_.bindAll(view, 'onClick');\njQuery(element).on('click', view.onClick);\n// => logs 'clicked docs' when clicked\n
    \n
    \n
    \n\n
    " } ,{ "href":"/cond", - "html":"

    cond source npm

    \n
    _.cond(pairs)
    \n\n

    Creates a function that iterates over pairs invoking the corresponding\nfunction of the first predicate to return truthy. The predicate-function\npairs are invoked with the this binding and arguments of the created\nfunction.

    \n
    \n\n

    参数

    \n
      \n
    1. pairs (Array)

      The predicate-function pairs.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var func = _.cond([\n  [_.matches({ 'a': 1 }),           _.constant('matches A')],\n  [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n  [_.constant(true),                _.constant('no match')]\n])\n\nfunc({ 'a': 1, 'b': 2 });\n// => 'matches A'\n\nfunc({ 'a': 0, 'b': 1 });\n// => 'matches B'\n\nfunc({ 'a': '1', 'b': '2' });\n// => 'no match'\n
    \n
    \n
    \n\n
    " } + "html":"

    cond source npm

    \n
    _.cond(pairs)
    \n\n

    Creates a function that iterates over pairs invoking the corresponding\nfunction of the first predicate to return truthy. The predicate-function\npairs are invoked with the this binding and arguments of the created\nfunction.

    \n
    \n\n

    参数

    \n
      \n
    1. pairs (Array)

      The predicate-function pairs.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var func = _.cond([\n  [_.matches({ 'a': 1 }),           _.constant('matches A')],\n  [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n  [_.constant(true),                _.constant('no match')]\n])\n\nfunc({ 'a': 1, 'b': 2 });\n// => 'matches A'\n\nfunc({ 'a': 0, 'b': 1 });\n// => 'matches B'\n\nfunc({ 'a': '1', 'b': '2' });\n// => 'no match'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/conforms", - "html":"

    conforms source npm

    \n
    _.conforms(source)
    \n\n

    Creates a function that invokes the predicate properties of source with\nthe corresponding property values of a given object, returning true if\nall predicates return truthy否则返回 false

    \n
    \n\n

    参数

    \n
      \n
    1. source (Object)

      The object of property predicates to conform to.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var users = [\n  { 'user': 'barney', 'age': 36 },\n  { 'user': 'fred',   'age': 40 }\n];\n\n_.filter(users, _.conforms({ 'age': _.partial(_.gt, _, 38) }));\n// => [{ 'user': 'fred', 'age': 40 }]\n
    \n
    \n
    \n\n
    " } + "html":"

    conforms source npm

    \n
    _.conforms(source)
    \n\n

    Creates a function that invokes the predicate properties of source with\nthe corresponding property values of a given object, returning true if\nall predicates return truthy否则返回 false

    \n
    \n\n

    参数

    \n
      \n
    1. source (Object)

      The object of property predicates to conform to.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var users = [\n  { 'user': 'barney', 'age': 36 },\n  { 'user': 'fred',   'age': 40 }\n];\n\n_.filter(users, _.conforms({ 'age': _.partial(_.gt, _, 38) }));\n// => [{ 'user': 'fred', 'age': 40 }]\n
    \n
    \n
    \n\n
    " } ,{ "href":"/constant", - "html":"

    constant source npm

    \n
    _.constant(value)
    \n\n

    Creates a function that returns value.

    \n
    \n\n

    参数

    \n
      \n
    1. value (*)

      The value to return from the new function.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var object = { 'user': 'fred' };\nvar getter = _.constant(object);\n\ngetter() === object;\n// => true\n
    \n
    \n
    \n\n
    " } + "html":"

    constant source npm

    \n
    _.constant(value)
    \n\n

    Creates a function that returns value.

    \n
    \n\n

    参数

    \n
      \n
    1. value (*)

      The value to return from the new function.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var object = { 'user': 'fred' };\nvar getter = _.constant(object);\n\ngetter() === object;\n// => true\n
    \n
    \n
    \n\n
    " } ,{ "href":"/flow", - "html":"

    flow source npm

    \n
    _.flow([funcs])
    \n\n

    Creates a function that returns the result of invoking the provided\nfunctions with the this binding of the created function, where each\nsuccessive invocation is supplied the return value of the previous.

    \n
    \n\n

    参数

    \n
      \n
    1. [funcs] (...(Function|Function[])

      Functions to invoke.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    function square(n) {\n  return n * n;\n}\n\nvar addSquare = _.flow(_.add, square);\naddSquare(1, 2);\n// => 9\n
    \n
    \n
    \n\n
    " } + "html":"

    flow source npm

    \n
    _.flow([funcs])
    \n\n

    Creates a function that returns the result of invoking the provided\nfunctions with the this binding of the created function, where each\nsuccessive invocation is supplied the return value of the previous.

    \n
    \n\n

    参数

    \n
      \n
    1. [funcs] (...(Function|Function[])

      Functions to invoke.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    function square(n) {\n  return n * n;\n}\n\nvar addSquare = _.flow(_.add, square);\naddSquare(1, 2);\n// => 9\n
    \n
    \n
    \n\n
    " } ,{ "href":"/flowRight", - "html":"

    flowRight source npm

    \n
    _.flowRight([funcs])
    \n\n

    这个方法类似 _.flow except that it creates a function that\ninvokes the provided functions from right to left.

    \n
    \n\n

    参数

    \n
      \n
    1. [funcs] (...(Function|Function[])

      Functions to invoke.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    function square(n) {\n  return n * n;\n}\n\nvar addSquare = _.flowRight(square, _.add);\naddSquare(1, 2);\n// => 9\n
    \n
    \n
    \n\n
    " } + "html":"

    flowRight source npm

    \n
    _.flowRight([funcs])
    \n\n

    这个方法类似 _.flow except that it creates a function that\ninvokes the provided functions from right to left.

    \n
    \n\n

    参数

    \n
      \n
    1. [funcs] (...(Function|Function[])

      Functions to invoke.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    function square(n) {\n  return n * n;\n}\n\nvar addSquare = _.flowRight(square, _.add);\naddSquare(1, 2);\n// => 9\n
    \n
    \n
    \n\n
    " } ,{ "href":"/identity", - "html":"

    identity source npm

    \n
    _.identity(value)
    \n\n

    This method returns the first argument provided to it.

    \n
    \n\n

    参数

    \n
      \n
    1. value (*)

      Any value.

      \n
    2. \n
    \n

    返回值 (*)

    \n

    Returns value.

    \n
    \n

    示例

    \n
    var object = { 'user': 'fred' };\n\n_.identity(object) === object;\n// => true\n
    \n
    \n
    \n\n
    " } + "html":"

    identity source npm

    \n
    _.identity(value)
    \n\n

    This method returns the first argument provided to it.

    \n
    \n\n

    参数

    \n
      \n
    1. value (*)

      Any value.

      \n
    2. \n
    \n

    返回值 (*)

    \n

    Returns value.

    \n
    \n

    示例

    \n
    var object = { 'user': 'fred' };\n\n_.identity(object) === object;\n// => true\n
    \n
    \n
    \n\n
    " } ,{ "href":"/iteratee", - "html":"

    iteratee source npm

    \n
    _.iteratee([func=_.identity])
    \n\n

    创建一个调用 func 的函数。 with the arguments of the created\nfunction. If func is a property name the created callback returns the\nproperty value for a given element. If func is an object the created\ncallback returns true for elements that contain the equivalent object properties, otherwise it returns false.

    \n
    \n\n

    参数

    \n
      \n
    1. [func=_.identity] (*)

      The value to convert to a callback.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the callback.

    \n
    \n

    示例

    \n
    var users = [\n  { 'user': 'barney', 'age': 36 },\n  { 'user': 'fred',   'age': 40 }\n];\n\n// wrap to create custom callback shorthands\n_.iteratee = _.wrap(_.iteratee, function(callback, func, thisArg) {\n  var match = /^(.+?)__([gl]t)(.+)$/.exec(func);\n  if (!match) {\n    return callback(func, thisArg);\n  }\n  return function(object) {\n    return match[2] == 'gt'\n      ? object[match[1]] > match[3]\n      : object[match[1]] < match[3];\n  };\n});\n\n_.filter(users, 'age__gt36');\n// => [{ 'user': 'fred', 'age': 40 }]\n
    \n
    \n
    \n\n
    " } + "html":"

    iteratee source npm

    \n
    _.iteratee([func=_.identity])
    \n\n

    创建一个调用 func 的函数。 with the arguments of the created\nfunction. If func is a property name the created callback returns the\nproperty value for a given element. If func is an object the created\ncallback returns true for elements that contain the equivalent object properties, otherwise it returns false.

    \n
    \n\n

    参数

    \n
      \n
    1. [func=_.identity] (*)

      The value to convert to a callback.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the callback.

    \n
    \n

    示例

    \n
    var users = [\n  { 'user': 'barney', 'age': 36 },\n  { 'user': 'fred',   'age': 40 }\n];\n\n// wrap to create custom callback shorthands\n_.iteratee = _.wrap(_.iteratee, function(callback, func, thisArg) {\n  var match = /^(.+?)__([gl]t)(.+)$/.exec(func);\n  if (!match) {\n    return callback(func, thisArg);\n  }\n  return function(object) {\n    return match[2] == 'gt'\n      ? object[match[1]] > match[3]\n      : object[match[1]] < match[3];\n  };\n});\n\n_.filter(users, 'age__gt36');\n// => [{ 'user': 'fred', 'age': 40 }]\n
    \n
    \n
    \n\n
    " } ,{ "href":"/matches", - "html":"

    matches source npm

    \n
    _.matches(source)
    \n\n

    Creates a function that performs a deep partial comparison between a given\nobject and source, returning true if the given object has equivalent\nproperty values否则返回 false\n
    \n
    \n注意: This method supports comparing the same values as _.isEqual.

    \n
    \n\n

    参数

    \n
      \n
    1. source (Object)

      The object of property values to match.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var users = [\n  { 'user': 'barney', 'age': 36, 'active': true },\n  { 'user': 'fred',   'age': 40, 'active': false }\n];\n\n_.filter(users, _.matches({ 'age': 40, 'active': false }));\n// => [{ 'user': 'fred', 'age': 40, 'active': false }]\n
    \n
    \n
    \n\n
    " } + "html":"

    matches source npm

    \n
    _.matches(source)
    \n\n

    Creates a function that performs a deep partial comparison between a given\nobject and source, returning true if the given object has equivalent\nproperty values否则返回 false\n
    \n
    \n注意: This method supports comparing the same values as _.isEqual.

    \n
    \n\n

    参数

    \n
      \n
    1. source (Object)

      The object of property values to match.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var users = [\n  { 'user': 'barney', 'age': 36, 'active': true },\n  { 'user': 'fred',   'age': 40, 'active': false }\n];\n\n_.filter(users, _.matches({ 'age': 40, 'active': false }));\n// => [{ 'user': 'fred', 'age': 40, 'active': false }]\n
    \n
    \n
    \n\n
    " } ,{ "href":"/matchesProperty", - "html":"

    matchesProperty source npm

    \n
    _.matchesProperty(path, srcValue)
    \n\n

    Creates a function that performs a deep partial comparison between the\nvalue at path of a given object to srcValue, returning true if the\nobject value is equivalent否则返回 false\n
    \n
    \n注意: This method supports comparing the same values as _.isEqual.

    \n
    \n\n

    参数

    \n
      \n
    1. path (Array|string)

      The path of the property to get.

      \n
    2. \n
    3. srcValue (*)

      The value to match.

      \n
    4. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var users = [\n  { 'user': 'barney' },\n  { 'user': 'fred' }\n];\n\n_.find(users, _.matchesProperty('user', 'fred'));\n// => { 'user': 'fred' }\n
    \n
    \n
    \n\n
    " } + "html":"

    matchesProperty source npm

    \n
    _.matchesProperty(path, srcValue)
    \n\n

    Creates a function that performs a deep partial comparison between the\nvalue at path of a given object to srcValue, returning true if the\nobject value is equivalent否则返回 false\n
    \n
    \n注意: This method supports comparing the same values as _.isEqual.

    \n
    \n\n

    参数

    \n
      \n
    1. path (Array|string)

      The path of the property to get.

      \n
    2. \n
    3. srcValue (*)

      The value to match.

      \n
    4. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var users = [\n  { 'user': 'barney' },\n  { 'user': 'fred' }\n];\n\n_.find(users, _.matchesProperty('user', 'fred'));\n// => { 'user': 'fred' }\n
    \n
    \n
    \n\n
    " } ,{ "href":"/method", - "html":"

    method source npm

    \n
    _.method(path, [args])
    \n\n

    Creates a function that invokes the method at path of a given object.\nAny additional arguments are provided to the invoked method.

    \n
    \n\n

    参数

    \n
      \n
    1. path (Array|string)

      The path of the method to invoke.

      \n
    2. \n
    3. [args] (...*)

      The arguments to invoke the method with.

      \n
    4. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var objects = [\n  { 'a': { 'b': { 'c': _.constant(2) } } },\n  { 'a': { 'b': { 'c': _.constant(1) } } }\n];\n\n_.map(objects, _.method('a.b.c'));\n// => [2, 1]\n\n_.invokeMap(_.sortBy(objects, _.method(['a', 'b', 'c'])), 'a.b.c');\n// => [1, 2]\n
    \n
    \n
    \n\n
    " } + "html":"

    method source npm

    \n
    _.method(path, [args])
    \n\n

    Creates a function that invokes the method at path of a given object.\nAny additional arguments are provided to the invoked method.

    \n
    \n\n

    参数

    \n
      \n
    1. path (Array|string)

      The path of the method to invoke.

      \n
    2. \n
    3. [args] (...*)

      The arguments to invoke the method with.

      \n
    4. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var objects = [\n  { 'a': { 'b': { 'c': _.constant(2) } } },\n  { 'a': { 'b': { 'c': _.constant(1) } } }\n];\n\n_.map(objects, _.method('a.b.c'));\n// => [2, 1]\n\n_.invokeMap(_.sortBy(objects, _.method(['a', 'b', 'c'])), 'a.b.c');\n// => [1, 2]\n
    \n
    \n
    \n\n
    " } ,{ "href":"/methodOf", - "html":"

    methodOf source npm

    \n
    _.methodOf(object, [args])
    \n\n

    The opposite of _.method; this method creates a function that invokes\nthe method at a given path of object. Any additional arguments are\nprovided to the invoked method.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to query.

      \n
    2. \n
    3. [args] (...*)

      The arguments to invoke the method with.

      \n
    4. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var array = _.times(3, _.constant),\n    object = { 'a': array, 'b': array, 'c': array };\n\n_.map(['a[2]', 'c[0]'], _.methodOf(object));\n// => [2, 0]\n\n_.map([['a', '2'], ['c', '0']], _.methodOf(object));\n// => [2, 0]\n
    \n
    \n
    \n\n
    " } + "html":"

    methodOf source npm

    \n
    _.methodOf(object, [args])
    \n\n

    The opposite of _.method; this method creates a function that invokes\nthe method at a given path of object. Any additional arguments are\nprovided to the invoked method.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要检索的对象

      \n
    2. \n
    3. [args] (...*)

      The arguments to invoke the method with.

      \n
    4. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var array = _.times(3, _.constant),\n    object = { 'a': array, 'b': array, 'c': array };\n\n_.map(['a[2]', 'c[0]'], _.methodOf(object));\n// => [2, 0]\n\n_.map([['a', '2'], ['c', '0']], _.methodOf(object));\n// => [2, 0]\n
    \n
    \n
    \n\n
    " } ,{ "href":"/mixin", - "html":"

    mixin source npm

    \n
    _.mixin([object=lodash], source, [options])
    \n\n

    Adds all own enumerable function properties of a source object to the\ndestination object. If object is a function then methods are added to\nits prototype as well.\n
    \n
    \n注意: Use _.runInContext to create a pristine lodash function to\navoid conflicts caused by modifying the original.

    \n
    \n\n

    参数

    \n
      \n
    1. [object=lodash] (Function|Object)

      目标对象

      \n
    2. \n
    3. source (Object)

      The object of functions to add.

      \n
    4. \n
    5. [options] (Object)

      The options object.

      \n
    6. \n
    7. [options.chain=true] (boolean)

      Specify whether the functions added are chainable.

      \n
    8. \n
    \n

    返回值 (Function|Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    function vowels(string) {\n  return _.filter(string, function(v) {\n    return /[aeiou]/i.test(v);\n  });\n}\n\n_.mixin({ 'vowels': vowels });\n_.vowels('fred');\n// => ['e']\n\n_('fred').vowels().value();\n// => ['e']\n\n_.mixin({ 'vowels': vowels }, { 'chain': false });\n_('fred').vowels();\n// => ['e']\n
    \n
    \n
    \n\n
    " } + "html":"

    mixin source npm

    \n
    _.mixin([object=lodash], source, [options])
    \n\n

    Adds all own enumerable function properties of a source object to the\ndestination object. If object is a function then methods are added to\nits prototype as well.\n
    \n
    \n注意: Use _.runInContext to create a pristine lodash function to\navoid conflicts caused by modifying the original.

    \n
    \n\n

    参数

    \n
      \n
    1. [object=lodash] (Function|Object)

      目标对象

      \n
    2. \n
    3. source (Object)

      The object of functions to add.

      \n
    4. \n
    5. [options] (Object)

      The options object.

      \n
    6. \n
    7. [options.chain=true] (boolean)

      Specify whether the functions added are chainable.

      \n
    8. \n
    \n

    返回值 (Function|Object)

    \n

    返回对象

    \n
    \n

    示例

    \n
    function vowels(string) {\n  return _.filter(string, function(v) {\n    return /[aeiou]/i.test(v);\n  });\n}\n\n_.mixin({ 'vowels': vowels });\n_.vowels('fred');\n// => ['e']\n\n_('fred').vowels().value();\n// => ['e']\n\n_.mixin({ 'vowels': vowels }, { 'chain': false });\n_('fred').vowels();\n// => ['e']\n
    \n
    \n
    \n\n
    " } ,{ "href":"/noConflict", - "html":"

    noConflict source npm

    \n
    _.noConflict()
    \n\n

    Reverts the _ variable to its previous value and returns a reference to\nthe lodash function.

    \n
    \n\n

    返回值 (Function)

    \n

    Returns the lodash function.

    \n
    \n

    示例

    \n
    var lodash = _.noConflict();\n
    \n
    \n
    \n\n
    " } + "html":"

    noConflict source npm

    \n
    _.noConflict()
    \n\n

    Reverts the _ variable to its previous value and returns a reference to\nthe lodash function.

    \n
    \n\n

    返回值 (Function)

    \n

    Returns the lodash function.

    \n
    \n

    示例

    \n
    var lodash = _.noConflict();\n
    \n
    \n
    \n\n
    " } ,{ "href":"/noop", - "html":"

    noop source npm

    \n
    _.noop()
    \n\n

    A no-operation function that returns undefined regardless of the\narguments it receives.

    \n
    \n\n

    示例

    \n
    var object = { 'user': 'fred' };\n\n_.noop(object) === undefined;\n// => true\n
    \n
    \n
    \n\n
    " } + "html":"

    noop source npm

    \n
    _.noop()
    \n\n

    A no-operation function that returns undefined regardless of the\narguments it receives.

    \n
    \n\n

    示例

    \n
    var object = { 'user': 'fred' };\n\n_.noop(object) === undefined;\n// => true\n
    \n
    \n
    \n\n
    " } ,{ "href":"/nthArg", - "html":"

    nthArg source npm

    \n
    _.nthArg([n=0])
    \n\n

    Creates a function that returns its nth argument.

    \n
    \n\n

    参数

    \n
      \n
    1. [n=0] (number)

      The index of the argument to return.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var func = _.nthArg(1);\n\nfunc('a', 'b', 'c');\n// => 'b'\n
    \n
    \n
    \n\n
    " } + "html":"

    nthArg source npm

    \n
    _.nthArg([n=0])
    \n\n

    Creates a function that returns its nth argument.

    \n
    \n\n

    参数

    \n
      \n
    1. [n=0] (number)

      The index of the argument to return.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var func = _.nthArg(1);\n\nfunc('a', 'b', 'c');\n// => 'b'\n
    \n
    \n
    \n\n
    " } ,{ "href":"/over", - "html":"

    over source npm

    \n
    _.over(iteratees)
    \n\n

    Creates a function that invokes iteratees with the arguments provided\nto the created function and returns their results.

    \n
    \n\n

    参数

    \n
      \n
    1. iteratees (...(Function|Function[])

      The iteratees to invoke.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var func = _.over(Math.max, Math.min);\n\nfunc(1, 2, 3, 4);\n// => [4, 1]\n
    \n
    \n
    \n\n
    " } + "html":"

    over source npm

    \n
    _.over(iteratees)
    \n\n

    Creates a function that invokes iteratees with the arguments provided\nto the created function and returns their results.

    \n
    \n\n

    参数

    \n
      \n
    1. iteratees (...(Function|Function[])

      The iteratees to invoke.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var func = _.over(Math.max, Math.min);\n\nfunc(1, 2, 3, 4);\n// => [4, 1]\n
    \n
    \n
    \n\n
    " } ,{ "href":"/overEvery", - "html":"

    overEvery source npm

    \n
    _.overEvery(predicates)
    \n\n

    Creates a function that checks if all of the predicates return\ntruthy when invoked with the arguments provided to the created function.

    \n
    \n\n

    参数

    \n
      \n
    1. predicates (...(Function|Function[])

      The predicates to check.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var func = _.overEvery(Boolean, isFinite);\n\nfunc('1');\n// => true\n\nfunc(null);\n// => false\n\nfunc(NaN);\n// => false\n
    \n
    \n
    \n\n
    " } + "html":"

    overEvery source npm

    \n
    _.overEvery(predicates)
    \n\n

    Creates a function that checks if all of the predicates return\ntruthy when invoked with the arguments provided to the created function.

    \n
    \n\n

    参数

    \n
      \n
    1. predicates (...(Function|Function[])

      The predicates to check.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var func = _.overEvery(Boolean, isFinite);\n\nfunc('1');\n// => true\n\nfunc(null);\n// => false\n\nfunc(NaN);\n// => false\n
    \n
    \n
    \n\n
    " } ,{ "href":"/overSome", - "html":"

    overSome source npm

    \n
    _.overSome(predicates)
    \n\n

    Creates a function that checks if any of the predicates return\ntruthy when invoked with the arguments provided to the created function.

    \n
    \n\n

    参数

    \n
      \n
    1. predicates (...(Function|Function[])

      The predicates to check.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var func = _.overSome(Boolean, isFinite);\n\nfunc('1');\n// => true\n\nfunc(null);\n// => true\n\nfunc(NaN);\n// => false\n
    \n
    \n
    \n\n
    " } + "html":"

    overSome source npm

    \n
    _.overSome(predicates)
    \n\n

    Creates a function that checks if any of the predicates return\ntruthy when invoked with the arguments provided to the created function.

    \n
    \n\n

    参数

    \n
      \n
    1. predicates (...(Function|Function[])

      The predicates to check.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var func = _.overSome(Boolean, isFinite);\n\nfunc('1');\n// => true\n\nfunc(null);\n// => true\n\nfunc(NaN);\n// => false\n
    \n
    \n
    \n\n
    " } ,{ "href":"/property", - "html":"

    property source npm

    \n
    _.property(path)
    \n\n

    Creates a function that returns the value at path of a given object.

    \n
    \n\n

    参数

    \n
      \n
    1. path (Array|string)

      The path of the property to get.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var objects = [\n  { 'a': { 'b': { 'c': 2 } } },\n  { 'a': { 'b': { 'c': 1 } } }\n];\n\n_.map(objects, _.property('a.b.c'));\n// => [2, 1]\n\n_.map(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');\n// => [1, 2]\n
    \n
    \n
    \n\n
    " } + "html":"

    property source npm

    \n
    _.property(path)
    \n\n

    Creates a function that returns the value at path of a given object.

    \n
    \n\n

    参数

    \n
      \n
    1. path (Array|string)

      The path of the property to get.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var objects = [\n  { 'a': { 'b': { 'c': 2 } } },\n  { 'a': { 'b': { 'c': 1 } } }\n];\n\n_.map(objects, _.property('a.b.c'));\n// => [2, 1]\n\n_.map(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');\n// => [1, 2]\n
    \n
    \n
    \n\n
    " } ,{ "href":"/propertyOf", - "html":"

    propertyOf source npm

    \n
    _.propertyOf(object)
    \n\n

    The opposite of _.property; this method creates a function that returns\nthe value at a given path of object.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      The object to query.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var array = [0, 1, 2],\n    object = { 'a': array, 'b': array, 'c': array };\n\n_.map(['a[2]', 'c[0]'], _.propertyOf(object));\n// => [2, 0]\n\n_.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n// => [2, 0]\n
    \n
    \n
    \n\n
    " } + "html":"

    propertyOf source npm

    \n
    _.propertyOf(object)
    \n\n

    The opposite of _.property; this method creates a function that returns\nthe value at a given path of object.

    \n
    \n\n

    参数

    \n
      \n
    1. object (Object)

      要检索的对象

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns the new function.

    \n
    \n

    示例

    \n
    var array = [0, 1, 2],\n    object = { 'a': array, 'b': array, 'c': array };\n\n_.map(['a[2]', 'c[0]'], _.propertyOf(object));\n// => [2, 0]\n\n_.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n// => [2, 0]\n
    \n
    \n
    \n\n
    " } ,{ "href":"/range", - "html":"

    range source npm

    \n
    _.range([start=0], end, [step=1])
    \n\n

    Creates an array of numbers (positive and/or negative) progressing from\nstart up to, but not including, end. A step of -1 is used if a negative\nstart is specified without an end or step. If end is not specified\nit's set to start with start then set to 0. If end is less than\nstart a zero-length range is created unless a negative step is specified.\n
    \n
    \n注意: JavaScript follows the IEEE-754 standard for resolving\nfloating-point values which can produce unexpected results.

    \n
    \n\n

    参数

    \n
      \n
    1. [start=0] (number)

      The start of the range.

      \n
    2. \n
    3. end (number)

      The end of the range.

      \n
    4. \n
    5. [step=1] (number)

      The value to increment or decrement by.

      \n
    6. \n
    \n

    返回值 (Array)

    \n

    Returns the new array of numbers.

    \n
    \n

    示例

    \n
    _.range(4);\n// => [0, 1, 2, 3]\n\n_.range(-4);\n// => [0, -1, -2, -3]\n\n_.range(1, 5);\n// => [1, 2, 3, 4]\n\n_.range(0, 20, 5);\n// => [0, 5, 10, 15]\n\n_.range(0, -4, -1);\n// => [0, -1, -2, -3]\n\n_.range(1, 4, 0);\n// => [1, 1, 1]\n\n_.range(0);\n// => []\n
    \n
    \n
    \n\n
    " } + "html":"

    range source npm

    \n
    _.range([start=0], end, [step=1])
    \n\n

    Creates an array of numbers (positive and/or negative) progressing from\nstart up to, but not including, end. A step of -1 is used if a negative\nstart is specified without an end or step. If end is not specified\nit's set to start with start then set to 0. If end is less than\nstart a zero-length range is created unless a negative step is specified.\n
    \n
    \n注意: JavaScript follows the IEEE-754 standard for resolving\nfloating-point values which can produce unexpected results.

    \n
    \n\n

    参数

    \n
      \n
    1. [start=0] (number)

      The start of the range.

      \n
    2. \n
    3. end (number)

      The end of the range.

      \n
    4. \n
    5. [step=1] (number)

      The value to increment or decrement by.

      \n
    6. \n
    \n

    返回值 (Array)

    \n

    Returns the new array of numbers.

    \n
    \n

    示例

    \n
    _.range(4);\n// => [0, 1, 2, 3]\n\n_.range(-4);\n// => [0, -1, -2, -3]\n\n_.range(1, 5);\n// => [1, 2, 3, 4]\n\n_.range(0, 20, 5);\n// => [0, 5, 10, 15]\n\n_.range(0, -4, -1);\n// => [0, -1, -2, -3]\n\n_.range(1, 4, 0);\n// => [1, 1, 1]\n\n_.range(0);\n// => []\n
    \n
    \n
    \n\n
    " } ,{ "href":"/rangeRight", - "html":"

    rangeRight source npm

    \n
    _.rangeRight([start=0], end, [step=1])
    \n\n

    这个方法类似 _.range except that it populates values in\ndescending order.

    \n
    \n\n

    参数

    \n
      \n
    1. [start=0] (number)

      The start of the range.

      \n
    2. \n
    3. end (number)

      The end of the range.

      \n
    4. \n
    5. [step=1] (number)

      The value to increment or decrement by.

      \n
    6. \n
    \n

    返回值 (Array)

    \n

    Returns the new array of numbers.

    \n
    \n

    示例

    \n
    _.rangeRight(4);\n// => [3, 2, 1, 0]\n\n_.rangeRight(-4);\n// => [-3, -2, -1, 0]\n\n_.rangeRight(1, 5);\n// => [4, 3, 2, 1]\n\n_.rangeRight(0, 20, 5);\n// => [15, 10, 5, 0]\n\n_.rangeRight(0, -4, -1);\n// => [-3, -2, -1, 0]\n\n_.rangeRight(1, 4, 0);\n// => [1, 1, 1]\n\n_.rangeRight(0);\n// => []\n
    \n
    \n
    \n\n
    " } + "html":"

    rangeRight source npm

    \n
    _.rangeRight([start=0], end, [step=1])
    \n\n

    这个方法类似 _.range except that it populates values in\ndescending order.

    \n
    \n\n

    参数

    \n
      \n
    1. [start=0] (number)

      The start of the range.

      \n
    2. \n
    3. end (number)

      The end of the range.

      \n
    4. \n
    5. [step=1] (number)

      The value to increment or decrement by.

      \n
    6. \n
    \n

    返回值 (Array)

    \n

    Returns the new array of numbers.

    \n
    \n

    示例

    \n
    _.rangeRight(4);\n// => [3, 2, 1, 0]\n\n_.rangeRight(-4);\n// => [-3, -2, -1, 0]\n\n_.rangeRight(1, 5);\n// => [4, 3, 2, 1]\n\n_.rangeRight(0, 20, 5);\n// => [15, 10, 5, 0]\n\n_.rangeRight(0, -4, -1);\n// => [-3, -2, -1, 0]\n\n_.rangeRight(1, 4, 0);\n// => [1, 1, 1]\n\n_.rangeRight(0);\n// => []\n
    \n
    \n
    \n\n
    " } ,{ "href":"/runInContext", "html":"

    runInContext source npm

    \n
    _.runInContext([context=root])
    \n\n

    Create a new pristine lodash function using the context object.

    \n
    \n\n

    参数

    \n
      \n
    1. [context=root] (Object)

      The context object.

      \n
    2. \n
    \n

    返回值 (Function)

    \n

    Returns a new lodash function.

    \n
    \n

    示例

    \n
    _.mixin({ 'foo': _.constant('foo') });\n\nvar lodash = _.runInContext();\nlodash.mixin({ 'bar': lodash.constant('bar') });\n\n_.isFunction(_.foo);\n// => true\n_.isFunction(_.bar);\n// => false\n\nlodash.isFunction(lodash.foo);\n// => false\nlodash.isFunction(lodash.bar);\n// => true\n\n// using `context` to mock `Date#getTime` use in `_.now`\nvar mock = _.runInContext({\n  'Date': function() {\n    return { 'getTime': getTimeMock };\n  }\n});\n\n// or creating a suped-up `defer` in Node.js\nvar defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n
    \n
    \n
    \n\n
    " } ,{ "href":"/times", - "html":"

    times source npm

    \n
    _.times(n, [iteratee=_.identity])
    \n\n

    Invokes the iteratee function n times, returning an array of the results\nof each invocation. The iteratee is invoked with one argument; (index).

    \n
    \n\n

    参数

    \n
      \n
    1. n (number)

      The number of times to invoke iteratee.

      \n
    2. \n
    3. [iteratee=_.identity] (Function)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (Array)

    \n

    Returns the array of results.

    \n
    \n

    示例

    \n
    _.times(3, String);\n// => ['0', '1', '2']\n\n _.times(4, _.constant(true));\n// => [true, true, true, true]\n
    \n
    \n
    \n\n
    " } + "html":"

    times source npm

    \n
    _.times(n, [iteratee=_.identity])
    \n\n

    Invokes the iteratee function n times, returning an array of the results\nof each invocation. The iteratee is invoked with one argument; (index).

    \n
    \n\n

    参数

    \n
      \n
    1. n (number)

      The number of times to invoke iteratee.

      \n
    2. \n
    3. [iteratee=_.identity] (Function)

      这个函数会处理每一个元素

      \n
    4. \n
    \n

    返回值 (Array)

    \n

    Returns the array of results.

    \n
    \n

    示例

    \n
    _.times(3, String);\n// => ['0', '1', '2']\n\n _.times(4, _.constant(true));\n// => [true, true, true, true]\n
    \n
    \n
    \n\n
    " } ,{ "href":"/toPath", - "html":"

    toPath source npm

    \n
    _.toPath(value)
    \n\n

    Converts value to a property path array.

    \n
    \n\n

    参数

    \n
      \n
    1. value (*)

      The value to convert.

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    Returns the new property path array.

    \n
    \n

    示例

    \n
    _.toPath('a.b.c');\n// => ['a', 'b', 'c']\n\n_.toPath('a[0].b.c');\n// => ['a', '0', 'b', 'c']\n\nvar path = ['a', 'b', 'c'],\n    newPath = _.toPath(path);\n\nconsole.log(newPath);\n// => ['a', 'b', 'c']\n\nconsole.log(path === newPath);\n// => false\n
    \n
    \n
    \n\n
    " } + "html":"

    toPath source npm

    \n
    _.toPath(value)
    \n\n

    Converts value to a property path array.

    \n
    \n\n

    参数

    \n
      \n
    1. value (*)

      The value to convert.

      \n
    2. \n
    \n

    返回值 (Array)

    \n

    Returns the new property path array.

    \n
    \n

    示例

    \n
    _.toPath('a.b.c');\n// => ['a', 'b', 'c']\n\n_.toPath('a[0].b.c');\n// => ['a', '0', 'b', 'c']\n\nvar path = ['a', 'b', 'c'],\n    newPath = _.toPath(path);\n\nconsole.log(newPath);\n// => ['a', 'b', 'c']\n\nconsole.log(path === newPath);\n// => false\n
    \n
    \n
    \n\n
    " } ,{ "href":"/uniqueId", - "html":"

    uniqueId source npm

    \n
    _.uniqueId([prefix])
    \n\n

    Generates a unique ID. If prefix is provided the ID is appended to it.

    \n
    \n\n

    参数

    \n
      \n
    1. [prefix] (string)

      The value to prefix the ID with.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the unique ID.

    \n
    \n

    示例

    \n
    _.uniqueId('contact_');\n// => 'contact_104'\n\n_.uniqueId();\n// => '105'\n
    \n
    \n
    \n\n
    " } + "html":"

    uniqueId source npm

    \n
    _.uniqueId([prefix])
    \n\n

    Generates a unique ID. If prefix is provided the ID is appended to it.

    \n
    \n\n

    参数

    \n
      \n
    1. [prefix] (string)

      The value to prefix the ID with.

      \n
    2. \n
    \n

    返回值 (string)

    \n

    Returns the unique ID.

    \n
    \n

    示例

    \n
    _.uniqueId('contact_');\n// => 'contact_104'\n\n_.uniqueId();\n// => '105'\n
    \n
    \n
    \n\n
    " } ] \ No newline at end of file diff --git a/parseInt.html b/parseInt.html index 61577c9..65c9cc9 100644 --- a/parseInt.html +++ b/parseInt.html @@ -392,7 +392,7 @@
    -

    parseInt source npm

    +

    parseInt source npm

    _.parseInt(string, [radix])

    Converts string to an integer of the specified radix. If radix is diff --git a/pick.html b/pick.html index 3f1e057..9633127 100644 --- a/pick.html +++ b/pick.html @@ -392,7 +392,7 @@

    -

    pick source npm

    +

    pick source npm

    _.pick(object, [props])

    Creates an object composed of the picked object properties.

    diff --git a/pickBy.html b/pickBy.html index 55220a9..d665ef7 100644 --- a/pickBy.html +++ b/pickBy.html @@ -392,7 +392,7 @@
    -

    pickBy source npm

    +

    pickBy source npm

    _.pickBy(object, [predicate=_.identity])

    Creates an object composed of the object properties predicate returns diff --git a/property.html b/property.html index a16c555..88d2a75 100644 --- a/property.html +++ b/property.html @@ -392,7 +392,7 @@

    -

    property source npm

    +

    property source npm

    _.property(path)

    Creates a function that returns the value at path of a given object.

    diff --git a/propertyOf.html b/propertyOf.html index afe9915..063f6fa 100644 --- a/propertyOf.html +++ b/propertyOf.html @@ -392,7 +392,7 @@
    -

    propertyOf source npm

    +

    propertyOf source npm

    _.propertyOf(object)

    The opposite of _.property; this method creates a function that returns @@ -401,7 +401,7 @@

    参数

      -
    1. object (Object)

      The object to query.

      +
    2. object (Object)

      要检索的对象

    返回值 (Function)

    diff --git a/random.html b/random.html index 3ba3245..1b7e988 100644 --- a/random.html +++ b/random.html @@ -392,7 +392,7 @@
    -

    random source npm

    +

    random source npm

    _.random([min=0], [max=1], [floating])

    产生一个包括 minmax 之间的数。 diff --git a/range.html b/range.html index b5360ff..1fc94b0 100644 --- a/range.html +++ b/range.html @@ -392,7 +392,7 @@

    -

    range source npm

    +

    range source npm

    _.range([start=0], end, [step=1])

    Creates an array of numbers (positive and/or negative) progressing from diff --git a/rangeRight.html b/rangeRight.html index b4f40b9..fb7c636 100644 --- a/rangeRight.html +++ b/rangeRight.html @@ -392,7 +392,7 @@

    -

    rangeRight source npm

    +

    rangeRight source npm

    _.rangeRight([start=0], end, [step=1])

    这个方法类似 _.range except that it populates values in diff --git a/repeat.html b/repeat.html index 8fd3c6b..785c0f0 100644 --- a/repeat.html +++ b/repeat.html @@ -392,7 +392,7 @@

    -

    repeat source npm

    +

    repeat source npm

    _.repeat([string=''], [n=0])

    Repeats the given string n times.

    diff --git a/replace.html b/replace.html index 18dc0fe..1af5b5e 100644 --- a/replace.html +++ b/replace.html @@ -392,7 +392,7 @@
    -

    replace source npm

    +

    replace source npm

    _.replace([string=''], pattern, replacement)

    Replaces matches for pattern in string with replacement. diff --git a/result.html b/result.html index 7da134b..b070d0f 100644 --- a/result.html +++ b/result.html @@ -392,7 +392,7 @@

    -

    result source npm

    +

    result source npm

    _.result(object, path, [defaultValue])

    这个方法类似 _.get except that if the resolved value is a function @@ -402,7 +402,7 @@

    参数

      -
    1. object (Object)

      The object to query.

      +
    2. object (Object)

      要检索的对象

    3. path (Array|string)

      The path of the property to resolve.

    4. diff --git a/round.html b/round.html index 714b11d..d41f039 100644 --- a/round.html +++ b/round.html @@ -392,7 +392,7 @@
      -

      round source npm

      +

      round source npm

      _.round(number, [precision=0])

      根据 precision 四舍五入 number。

      diff --git a/set.html b/set.html index 72d6fc5..c056382 100644 --- a/set.html +++ b/set.html @@ -392,7 +392,7 @@
      -

      set source npm

      +

      set source npm

      _.set(object, path, value)

      Sets the value at path of object. If a portion of path doesn't exist diff --git a/setWith.html b/setWith.html index 4ef835e..3f6df14 100644 --- a/setWith.html +++ b/setWith.html @@ -392,7 +392,7 @@

      -

      setWith source npm

      +

      setWith source npm

      _.setWith(object, path, value, [customizer])

      这个方法类似 _.set except that it accepts customizer which is diff --git a/snakeCase.html b/snakeCase.html index 868f40b..e40768e 100644 --- a/snakeCase.html +++ b/snakeCase.html @@ -392,7 +392,7 @@

      -

      snakeCase source npm

      +

      snakeCase source npm

      _.snakeCase([string=''])

      Converts string to snake case.

      diff --git a/split.html b/split.html index f951732..4904d98 100644 --- a/split.html +++ b/split.html @@ -392,7 +392,7 @@
      -

      split source npm

      +

      split source npm

      _.split([string=''], separator, [limit])

      Splits string by separator. diff --git a/startCase.html b/startCase.html index 49f6f94..cbf3480 100644 --- a/startCase.html +++ b/startCase.html @@ -392,7 +392,7 @@

      -

      startCase source npm

      +

      startCase source npm

      _.startCase([string=''])

      Converts string to start case.

      diff --git a/startsWith.html b/startsWith.html index 30463ed..962866b 100644 --- a/startsWith.html +++ b/startsWith.html @@ -392,7 +392,7 @@
      -

      startsWith source npm

      +

      startsWith source npm

      _.startsWith([string=''], [target], [position=0])

      Checks if string starts with the given target string.

      diff --git a/subtract.html b/subtract.html index c70f4d3..2c3b3b3 100644 --- a/subtract.html +++ b/subtract.html @@ -392,7 +392,7 @@
      -

      subtract source npm

      +

      subtract source npm

      _.subtract(minuend, subtrahend)

      两双相减

      diff --git a/sum.html b/sum.html index 0069bde..b75737e 100644 --- a/sum.html +++ b/sum.html @@ -392,7 +392,7 @@
      -

      sum source npm

      +

      sum source npm

      _.sum(array)

      计算 array 中值的总和

      diff --git a/sumBy.html b/sumBy.html index de8616f..05fc391 100644 --- a/sumBy.html +++ b/sumBy.html @@ -392,7 +392,7 @@
      -

      sumBy source npm

      +

      sumBy source npm

      _.sumBy(array, [iteratee=_.identity])

      这个方法类似 _.sum。 diff --git a/template.html b/template.html index 70dcf95..7d3f872 100644 --- a/template.html +++ b/template.html @@ -392,7 +392,7 @@

      -

      template source npm

      +

      template source npm

      _.template([string=''], [options])

      Creates a compiled template function that can interpolate data properties diff --git a/times.html b/times.html index 31490cc..f5aaf5c 100644 --- a/times.html +++ b/times.html @@ -392,7 +392,7 @@

      -

      times source npm

      +

      times source npm

      _.times(n, [iteratee=_.identity])

      Invokes the iteratee function n times, returning an array of the results diff --git a/toLower.html b/toLower.html index c8c8731..da74860 100644 --- a/toLower.html +++ b/toLower.html @@ -392,7 +392,7 @@

      -

      toLower source npm

      +

      toLower source npm

      _.toLower([string=''])

      Converts string, as a whole, to lower case.

      diff --git a/toPairs.html b/toPairs.html index ec180be..33e7aa4 100644 --- a/toPairs.html +++ b/toPairs.html @@ -392,7 +392,7 @@
      -

      toPairs source npm

      +

      toPairs source npm

      _.toPairs(object)

      Creates an array of own enumerable key-value pairs for object.

      @@ -400,7 +400,7 @@

      参数

        -
      1. object (Object)

        The object to query.

        +
      2. object (Object)

        要检索的对象

      返回值 (Array)

      diff --git a/toPairsIn.html b/toPairsIn.html index 7594f29..7f730c1 100644 --- a/toPairsIn.html +++ b/toPairsIn.html @@ -392,7 +392,7 @@
      -

      toPairsIn source npm

      +

      toPairsIn source npm

      _.toPairsIn(object)

      Creates an array of own and inherited enumerable key-value pairs for object.

      @@ -400,7 +400,7 @@

      参数

        -
      1. object (Object)

        The object to query.

        +
      2. object (Object)

        要检索的对象

      返回值 (Array)

      diff --git a/toPath.html b/toPath.html index 4432d56..a104a0b 100644 --- a/toPath.html +++ b/toPath.html @@ -392,7 +392,7 @@
      -

      toPath source npm

      +

      toPath source npm

      _.toPath(value)

      Converts value to a property path array.

      diff --git a/toUpper.html b/toUpper.html index 86f3851..1a20595 100644 --- a/toUpper.html +++ b/toUpper.html @@ -392,7 +392,7 @@
      -

      toUpper source npm

      +

      toUpper source npm

      _.toUpper([string=''])

      Converts string, as a whole, to upper case.

      diff --git a/transform.html b/transform.html index 19fba09..d1d5980 100644 --- a/transform.html +++ b/transform.html @@ -392,7 +392,7 @@
      -

      transform source npm

      +

      transform source npm

      _.transform(object, [iteratee=_.identity], [accumulator])

      An alternative to _.reduce; this method transforms object to a new @@ -405,7 +405,7 @@

      参数

        -
      1. object (Array|Object)

        The object to iterate over.

        +
      2. object (Array|Object)

        要遍历的对象

      3. [iteratee=_.identity] (Function)

        这个函数会处理每一个元素

      4. diff --git a/trim.html b/trim.html index ac09ce8..4cd2aaa 100644 --- a/trim.html +++ b/trim.html @@ -392,7 +392,7 @@
        -

        trim source npm

        +

        trim source npm

        _.trim([string=''], [chars=whitespace])

        Removes leading and trailing whitespace or specified characters from string.

        diff --git a/trimEnd.html b/trimEnd.html index 52edc64..63d4b2d 100644 --- a/trimEnd.html +++ b/trimEnd.html @@ -392,7 +392,7 @@
        -

        trimEnd source npm

        +

        trimEnd source npm

        _.trimEnd([string=''], [chars=whitespace])

        Removes trailing whitespace or specified characters from string.

        diff --git a/trimStart.html b/trimStart.html index 9f550de..c05a755 100644 --- a/trimStart.html +++ b/trimStart.html @@ -392,7 +392,7 @@
        -

        trimStart source npm

        +

        trimStart source npm

        _.trimStart([string=''], [chars=whitespace])

        Removes leading whitespace or specified characters from string.

        diff --git a/truncate.html b/truncate.html index da7896c..4a91ce4 100644 --- a/truncate.html +++ b/truncate.html @@ -392,7 +392,7 @@
        -

        truncate source npm

        +

        truncate source npm

        _.truncate([string=''], [options])

        Truncates string if it's longer than the given maximum string length. diff --git a/unescape.html b/unescape.html index 5e663f6..cd01612 100644 --- a/unescape.html +++ b/unescape.html @@ -392,7 +392,7 @@

        -

        unescape source npm

        +

        unescape source npm

        _.unescape([string=''])

        The inverse of _.escape; this method converts the HTML entities diff --git a/uniqueId.html b/uniqueId.html index 5cc55a5..6b2fd81 100644 --- a/uniqueId.html +++ b/uniqueId.html @@ -392,7 +392,7 @@

        -

        uniqueId source npm

        +

        uniqueId source npm

        _.uniqueId([prefix])

        Generates a unique ID. If prefix is provided the ID is appended to it.

        diff --git a/unset.html b/unset.html index 3c06d82..5a9c122 100644 --- a/unset.html +++ b/unset.html @@ -392,7 +392,7 @@
        -

        unset source npm

        +

        unset source npm

        _.unset(object, path)

        Removes the property at path of object.

        diff --git a/upperCase.html b/upperCase.html index a55361c..81e852e 100644 --- a/upperCase.html +++ b/upperCase.html @@ -392,7 +392,7 @@
        -

        upperCase source npm

        +

        upperCase source npm

        _.upperCase([string=''])

        Converts string, as space separated words, to upper case.

        diff --git a/upperFirst.html b/upperFirst.html index 78dd893..1e713be 100644 --- a/upperFirst.html +++ b/upperFirst.html @@ -392,7 +392,7 @@
        -

        upperFirst source npm

        +

        upperFirst source npm

        _.upperFirst([string=''])

        Converts the first character of string to upper case.

        diff --git a/values.html b/values.html index c6d1137..9d121c8 100644 --- a/values.html +++ b/values.html @@ -392,7 +392,7 @@
        -

        values source npm

        +

        values source npm

        _.values(object)

        Creates an array of the own enumerable property values of object. @@ -403,7 +403,7 @@

        参数

          -
        1. object (Object)

          The object to query.

          +
        2. object (Object)

          要检索的对象

        返回值 (Array)

        diff --git a/valuesIn.html b/valuesIn.html index 1c1e02a..8763250 100644 --- a/valuesIn.html +++ b/valuesIn.html @@ -392,7 +392,7 @@
        -

        valuesIn source npm

        +

        valuesIn source npm

        _.valuesIn(object)

        Creates an array of the own and inherited enumerable property values of object. @@ -403,7 +403,7 @@

        参数

          -
        1. object (Object)

          The object to query.

          +
        2. object (Object)

          要检索的对象

        返回值 (Array)

        diff --git a/words.html b/words.html index 2cfc3a5..444e9de 100644 --- a/words.html +++ b/words.html @@ -392,7 +392,7 @@
        -

        words source npm

        +

        words source npm

        _.words([string=''], [pattern])

        Splits string into an array of its words.