VERSION source
+VERSION source
(string): The semantic version number.
diff --git a/_.html b/_.html index 7d1c537..11d6831 100644 --- a/_.html +++ b/_.html @@ -392,7 +392,7 @@_ source
+_ source
Creates a lodash
object which wraps value
to enable implicit method
diff --git a/add.html b/add.html
index f8578fb..490f2f7 100644
--- a/add.html
+++ b/add.html
@@ -392,7 +392,7 @@
add source npm
+add source npm
Adds two numbers.
diff --git a/after.html b/after.html index 5057564..863b504 100644 --- a/after.html +++ b/after.html @@ -392,7 +392,7 @@after source npm
+after source npm
The opposite of _.before
; this method creates a function that invokes
diff --git a/all.html b/all.html
index b839643..8079cca 100644
--- a/all.html
+++ b/all.html
@@ -591,11 +591,11 @@
兼容性
-V, --version ......... 显示当前的 lodash 版本号chunk source npm
+chunk source npm
将 array 拆分成多个 size 长度的块,并组成一个新数组。 -如果 array 无法被分割成全部等长的块,那么最后剩余的元素将组成一个块。
+将数组拆分成多个 size 长度的块,并组成一个新数组。 +如果数组无法被分割成全部等长的块,那么最后剩余的元素将组成一个块。
参数
@@ -617,20 +617,20 @@示例
compact source npm
+compact source npm
Creates an array with all falsey values removed. The values false
, null
,
-0
, ""
, undefined
, and NaN
are falsey.
创建一个移除了所有假值的数组。例如:false
、null
、
+0
、""
、undefined
, 以及NaN
都是 “假值”.
参数
-
-
- array (Array)
The array to compact.
+- array (Array)
需要被处理的数组。
返回值 (Array)
--Returns the new array of filtered values.
+返回移除了假值的数组。
示例
_.compact([0, 1, false, 2, '', 3]); @@ -638,22 +638,21 @@
示例
concat source npm
+concat source npm
_.concat(array, [values])-Creates a new array concatenating
+array
with any additional arrays -and/or values.创建一个用任何数组 或 值连接的新数组。
参数
-
-
- array (Array)
The array to concatenate.
+- array (Array)
-需要被连接的数组
- [values] (...*)
The values to concatenate.
+- [values] (...*)
需要被连接的值的队列
返回值 (Array)
--Returns the new concatenated array.
+返回连接后的新数组
示例
var array = [1]; @@ -667,23 +666,21 @@
示例
difference source npm
+difference source npm
_.difference(array, [values])-Creates an array of unique
+array
values not included in the other -provided arrays usingSameValueZero
-for equality comparisons.创建一个差异化后的数组,不包括使用
SameValueZero
方法提供的数组。参数
-
-
- array (Array)
The array to inspect.
+- array (Array)
-需要处理的数组
- [values] (...Array)
The values to exclude.
+- [values] (...Array)
用于对比差异的数组
返回值 (Array)
--Returns the new array of filtered values.
+返回一个差异化后的新数组
示例
_.difference([3, 2, 1], [4, 2]); @@ -691,55 +688,51 @@
示例
differenceBy source npm
+differenceBy source npm
_.differenceBy(array, [values], [iteratee=_.identity])-This method is like
+_.difference
except that it acceptsiteratee
which -is invoked for each element ofarray
andvalues
to generate the criterion -by which uniqueness is computed. The iteratee is invoked with one argument: (value).这个方法类似
_.difference
,除了它接受一个 iteratee 调用每一个数组和值。iteratee 会传入一个参数:(value)。参数
-
-
- array (Array)
The array to inspect.
+- array (Array)
-需要处理的数组
- [values] (...Array)
The values to exclude.
+- [values] (...Array)
-用于对比差异的数组
- [iteratee=_.identity] (Function|Object|string)
The iteratee invoked per element.
+- [iteratee=_.identity] (Function|Object|string)
这个函数会调用每一个元素
返回值 (Array)
--Returns the new array of filtered values.
+返回一个差异化后的新数组
示例
_.differenceBy([3.1, 2.2, 1.3], [4.4, 2.5], Math.floor); // => [3.1, 1.3] -// using the `_.property` callback shorthand +// 使用了 `_.property` 的回调结果 _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); // => [{ 'x': 2 }]
differenceWith source npm
+differenceWith source npm
_.differenceWith(array, [values], [comparator])-This method is like
+_.difference
except that it acceptscomparator
-which is invoked to compare elements ofarray
tovalues
. The comparator -is invoked with two arguments: (arrVal, othVal).这个方法类似
_.difference
,除了它接受一个 comparator 调用每一个数组元素的值。 comparator 会传入2个参数:(arrVal, othVal)。参数
-
-
- array (Array)
The array to inspect.
+- array (Array)
-需要处理的数组
- [values] (...Array)
The values to exclude.
+- [values] (...Array)
-用于对比差异的数组
- [comparator] (Function)
The comparator invoked per element.
+- [comparator] (Function)
这个函数会调用每一个元素
返回值 (Array)
--Returns the new array of filtered values.
+返回一个差异化后的新数组
示例
var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; @@ -749,21 +742,21 @@
示例
drop source npm
+drop source npm
_.drop(array, [n=1])-Creates a slice of
+array
withn
elements dropped from the beginning.裁剪数组中的前 N 个数组,返回剩余的部分。
参数
-
-
- array (Array)
The array to query.
+- array (Array)
-需要处理的数组
- [n=1] (number)
The number of elements to drop.
+- [n=1] (number)
裁剪的个数
返回值 (Array)
--Returns the slice of
+array
.返回数组的剩余的部分。
示例
_.drop([1, 2, 3]); @@ -780,21 +773,21 @@
示例
dropRight source npm
+dropRight source npm
_.dropRight(array, [n=1])-Creates a slice of
+array
withn
elements dropped from the end.从右边开始裁剪数组中的 N 个数组,返回剩余的部分。
参数
-
-
- array (Array)
The array to query.
+- array (Array)
-需要处理的数组
- [n=1] (number)
The number of elements to drop.
+- [n=1] (number)
裁剪的个数
返回值 (Array)
--Returns the slice of
+array
.返回数组的剩余的部分。
示例
_.dropRight([1, 2, 3]); @@ -811,23 +804,21 @@
示例
dropRightWhile source npm
+dropRightWhile source npm
_.dropRightWhile(array, [predicate=_.identity])-Creates a slice of
+array
excluding elements dropped from the end. -Elements are dropped untilpredicate
returns falsey. The predicate is -invoked with three arguments: (value, index, array).从右边开始裁剪数组,起点从
predicate
返回假值开始。predicate
会传入3个参数:(value, index, array)。参数
-
-
- array (Array)
The array to query.
+- array (Array)
-需要处理的数组
- [predicate=_.identity] (Function|Object|string)
The function invoked per iteration.
+- [predicate=_.identity] (Function|Object|string)
这个函数会在每一次迭代调用
返回值 (Array)
--Returns the slice of
+array
.返回裁剪后的数组
示例
var resolve = _.partial(_.map, _, 'user'); @@ -841,33 +832,31 @@
示例
resolve( _.dropRightWhile(users, function(o) { return !o.active; }) ); // => ['barney'] -// using the `_.matches` callback shorthand +// 使用了 `_.matches` 的回调结果 resolve( _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }) ); // => ['barney', 'fred'] -// using the `_.matchesProperty` callback shorthand +// 使用了 `_.matchesProperty` 的回调结果 resolve( _.dropRightWhile(users, ['active', false]) ); // => ['barney'] -// using the `_.property` callback shorthand +// 使用了 `_.property` 的回调结果 resolve( _.dropRightWhile(users, 'active') ); // => ['barney', 'fred', 'pebbles']dropWhile source npm
+dropWhile source npm
_.dropWhile(array, [predicate=_.identity])-Creates a slice of
+array
excluding elements dropped from the beginning. -Elements are dropped untilpredicate
returns falsey. The predicate is -invoked with three arguments: (value, index, array).裁剪数组,起点从
predicate
返回假值开始。predicate
会传入3个参数:(value, index, array)。参数
-
-
- array (Array) -
The array to query.
+- array (Array)
-array 需要处理的数组
- [predicate=_.identity] (Function|Object|string)
The function invoked per iteration.
+- [predicate=_.identity] (Function|Object|string)
这个函数会在每一次迭代调用
返回值 (Array)
@@ -885,43 +874,42 @@示例
resolve( _.dropWhile(users, function(o) { return !o.active; }) ); // => ['pebbles'] -// using the `_.matches` callback shorthand +// 使用了 `_.matches` 的回调结果 resolve( _.dropWhile(users, { 'user': 'barney', 'active': false }) ); // => ['fred', 'pebbles'] -// using the `_.matchesProperty` callback shorthand +// 使用了 `_.matchesProperty` 的回调结果 resolve( _.dropWhile(users, ['active', false]) ); // => ['pebbles'] -// using the `_.property` callback shorthand +// 使用了 `_.property` 的回调结果 resolve( _.dropWhile(users, 'active') ); // => ['barney', 'fred', 'pebbles']fill source npm
+fill source npm
_.fill(array, value, [start=0], [end=array.length])-Fills elements of
array
withvalue
fromstart
up to, but not -including,end
. +指定
+注意: 这个方法会改变数组值
填充数组,从start
到end
的位置,但不包括end
本身的位置。
-Note: This method mutatesarray
.参数
-
-
- array (Array)
The array to fill.
+- array (Array)
-需要填充的数组
- value (*)
The value to fill
+array
with.- value (*)
-填充的值
- [start=0] (number)
The start position.
+- [start=0] (number)
-开始位置
- [end=array.length] (number)
The end position.
+- [end=array.length] (number)
结束位置
返回值 (Array)
--Returns
+array
.返回数组
示例
var array = [1, 2, 3]; @@ -938,22 +926,21 @@
示例
findIndex source npm
+findIndex source npm
_.findIndex(array, [predicate=_.identity])-This method is like
+_.find
except that it returns the index of the first -elementpredicate
returns truthy for instead of the element itself.这个方法类似
_.find
。除了它返回最先通过predicate
判断为真值的元素的 index ,而不是元素本身。参数
-
-
- array (Array)
The array to search.
+- array (Array)
-需要搜索的数组
- [predicate=_.identity] (Function|Object|string)
The function invoked per iteration.
+- [predicate=_.identity] (Function|Object|string)
这个函数会在每一次迭代调用
返回值 (number)
--Returns the index of the found element, else
+-1
.返回符合元素的 index,否则返回
-1
。示例
var users = [ @@ -965,36 +952,35 @@
示例
_.findIndex(users, function(o) { return o.user == 'barney'; }); // => 0 -// using the `_.matches` callback shorthand +// 使用了 `_.matches` 的回调结果 _.findIndex(users, { 'user': 'fred', 'active': false }); // => 1 -// using the `_.matchesProperty` callback shorthand +// 使用了 `_.matchesProperty` 的回调结果 _.findIndex(users, ['active', false]); // => 0 -// using the `_.property` callback shorthand +// 使用了 `_.property` 的回调结果 _.findIndex(users, 'active'); // => 2findLastIndex source npm
+findLastIndex source npm
_.findLastIndex(array, [predicate=_.identity])-This method is like
+_.findIndex
except that it iterates over elements -ofcollection
from right to left.这个方式类似
_.findIndex
, 不过它是从右到左迭代的。参数
-
-
- array (Array)
The array to search.
+- array (Array)
-需要搜索的数组
- [predicate=_.identity] (Function|Object|string)
The function invoked per iteration.
+- [predicate=_.identity] (Function|Object|string)
这个函数会在每一次迭代调用
返回值 (number)
--Returns the index of the found element, else
+-1
.返回符合元素的 index,否则返回
-1
。示例
var users = [ @@ -1006,37 +992,36 @@
示例
_.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); // => 2 -// using the `_.matches` callback shorthand +// 使用了 `_.matches` 的回调结果 _.findLastIndex(users, { 'user': 'barney', 'active': true }); // => 0 -// using the `_.matchesProperty` callback shorthand +// 使用了 `_.matchesProperty` 的回调结果 _.findLastIndex(users, ['active', false]); // => 2 -// using the `_.property` callback shorthand +// 使用了 `_.property` 的回调结果 _.findLastIndex(users, 'active'); // => 0flatMap source npm
+flatMap source npm
_.flatMap(array, [iteratee=_.identity])-Creates an array of flattened values by running each element in
+array
-throughiteratee
and concating its result to the other mapped values. -The iteratee is invoked with three arguments: (value, index|key, array).创建一个扁平化的数组,每一个值会传入
iteratee
处理,处理结果会与值合并。 +iteratee 会传入3个参数:(value, index|key, array)。参数
-
-
- array (Array)
The array to iterate over.
+- array (Array)
-遍历用的数组
- [iteratee=_.identity] (Function|Object|string)
The function invoked per iteration.
+- [iteratee=_.identity] (Function|Object|string)
这个函数会在每一次迭代调用
返回值 (Array)
--Returns the new array.
+返回新数组
示例
function duplicate(n) { @@ -1048,7 +1033,7 @@
示例
flatten source npm
+ -flattenDeep source npm
+-flattenDeep source npm
_.flattenDeep(array)This method is like
@@ -1088,7 +1073,7 @@_.flatten
except that it recursively flattensarray
.示例
fromPairs source npm
+-fromPairs source npm
_.fromPairs(pairs)The inverse of
_.toPairs
; this method returns an object composed @@ -1109,7 +1094,7 @@示例
head first source npm
+ -indexOf source npm
+-indexOf source npm
_.indexOf(array, value, [fromIndex=0])Gets the index at which the first occurrence of
value
is found inarray
@@ -1164,7 +1149,7 @@示例
initial source npm
+-initial source npm
_.initial(array)Gets all but the last element of
@@ -1184,7 +1169,7 @@array
.示例
intersection source npm
+-intersection source npm
_.intersection([arrays])Creates an array of unique values that are included in all of the provided @@ -1206,7 +1191,7 @@
示例
intersectionBy source npm
+-intersectionBy source npm
_.intersectionBy([arrays], [iteratee=_.identity])This method is like
_.intersection
except that it acceptsiteratee
@@ -1234,7 +1219,7 @@示例
intersectionWith source npm
+-intersectionWith source npm
_.intersectionWith([arrays], [comparator])This method is like
_.intersection
except that it acceptscomparator
@@ -1261,7 +1246,7 @@示例
join source npm
+-join source npm
_.join(array, [separator=','])Converts all elements in
@@ -1283,7 +1268,7 @@array
into a string separated byseparator
.示例
last source npm
+ -lastIndexOf source npm
+-lastIndexOf source npm
_.lastIndexOf(array, value, [fromIndex=array.length-1])This method is like
_.indexOf
except that it iterates over elements of @@ -1332,7 +1317,7 @@示例
prototype.reverse source npm
+-prototype.reverse source npm
_.prototype.reverse()Reverses
array
so that the first element becomes the last, the second @@ -1357,7 +1342,7 @@示例
pull source npm
+-pull source npm
_.pull(array, [values])Removes all provided values from
array
using @@ -1387,7 +1372,7 @@示例
pullAll source npm
+-pullAll source npm
_.pullAll(array, values)This method is like
_.pull
except that it accepts an array of values to remove. @@ -1415,7 +1400,7 @@示例
pullAllBy source npm
+-pullAllBy source npm
_.pullAllBy(array, values, [iteratee=_.identity])This method is like
_.pullAll
except that it acceptsiteratee
which is @@ -1447,7 +1432,7 @@示例
pullAt source npm
+-pullAt source npm
_.pullAt(array, [indexes])Removes elements from
array
corresponding toindexes
and returns an @@ -1479,7 +1464,7 @@示例
remove source npm
+-remove source npm
_.remove(array, [predicate=_.identity])Removes all elements from
array
thatpredicate
returns truthy for @@ -1514,7 +1499,7 @@示例
slice source npm
+slice source npm
_.slice(array, [start=0], [end=array.length])-Creates a slice of
array
fromstart
up to, but not including,end
. @@ -1537,7 +1522,7 @@返回值 (Array)
Returns the slice of
array
.sortedIndex source npm
+-sortedIndex source npm
_.sortedIndex(array, value)Uses a binary search to determine the lowest index at which
value
should @@ -1563,7 +1548,7 @@示例
sortedIndexBy source npm
+-sortedIndexBy source npm
_.sortedIndexBy(array, value, [iteratee=_.identity])This method is like
_.sortedIndex
except that it acceptsiteratee
@@ -1595,7 +1580,7 @@示例
sortedIndexOf source npm
+-sortedIndexOf source npm
_.sortedIndexOf(array, value)This method is like
_.indexOf
except that it performs a binary @@ -1618,7 +1603,7 @@示例
sortedLastIndex source npm
+-sortedLastIndex source npm
_.sortedLastIndex(array, value)This method is like
_.sortedIndex
except that it returns the highest @@ -1642,7 +1627,7 @@示例
sortedLastIndexBy source npm
+-sortedLastIndexBy source npm
_.sortedLastIndexBy(array, value, [iteratee=_.identity])This method is like
_.sortedLastIndex
except that it acceptsiteratee
@@ -1669,7 +1654,7 @@示例
sortedLastIndexOf source npm
+-sortedLastIndexOf source npm
_.sortedLastIndexOf(array, value)This method is like
_.lastIndexOf
except that it performs a binary @@ -1692,7 +1677,7 @@示例
sortedUniq source npm
+-sortedUniq source npm
_.sortedUniq(array)This method is like
_.uniq
except that it's designed and optimized @@ -1713,7 +1698,7 @@示例
sortedUniqBy source npm
+-sortedUniqBy source npm
_.sortedUniqBy(array, [iteratee])This method is like
_.uniqBy
except that it's designed and optimized @@ -1736,7 +1721,7 @@示例
tail source npm
+ -take source npm
+-take source npm
_.take(array, [n=1])Creates a slice of
@@ -1787,7 +1772,7 @@array
withn
elements taken from the beginning.示例
takeRight source npm
+-takeRight source npm
_.takeRight(array, [n=1])Creates a slice of
@@ -1818,7 +1803,7 @@array
withn
elements taken from the end.示例
takeRightWhile source npm
+-takeRightWhile source npm
_.takeRightWhile(array, [predicate=_.identity])Creates a slice of
array
with elements taken from the end. Elements are @@ -1862,7 +1847,7 @@示例
takeWhile source npm
+-takeWhile source npm
_.takeWhile(array, [predicate=_.identity])Creates a slice of
array
with elements taken from the beginning. Elements @@ -1906,7 +1891,7 @@示例
union source npm
+-union source npm
_.union([arrays])Creates an array of unique values, in order, from all of the provided arrays @@ -1928,7 +1913,7 @@
示例
unionBy source npm
+-unionBy source npm
_.unionBy([arrays], [iteratee=_.identity])This method is like
_.union
except that it acceptsiteratee
which is @@ -1956,7 +1941,7 @@示例
unionWith source npm
+-unionWith source npm
_.unionWith([arrays], [comparator])This method is like
_.union
except that it acceptscomparator
which @@ -1983,7 +1968,7 @@示例
uniq source npm
+-uniq source npm
_.uniq(array)Creates a duplicate-free version of an array, using @@ -2006,7 +1991,7 @@
示例
uniqBy source npm
+-uniqBy source npm
_.uniqBy(array, [iteratee=_.identity])This method is like
_.uniq
except that it acceptsiteratee
which is @@ -2034,7 +2019,7 @@示例
uniqWith source npm
+-uniqWith source npm
_.uniqWith(array, [comparator])This method is like
_.uniq
except that it acceptscomparator
which @@ -2060,7 +2045,7 @@示例
unzip source npm
+-unzip source npm
_.unzip(array)This method is like
_.zip
except that it accepts an array of grouped @@ -2085,7 +2070,7 @@示例
unzipWith source npm
+-unzipWith source npm
_.unzipWith(array, [iteratee=_.identity])This method is like
_.unzip
except that it acceptsiteratee
to specify @@ -2113,7 +2098,7 @@示例
without source npm
+-without source npm
_.without(array, [values])Creates an array excluding all provided values using @@ -2137,7 +2122,7 @@
示例
xor source npm
+-xor source npm
_.xor([arrays])Creates an array of unique values that is the symmetric difference @@ -2158,7 +2143,7 @@
示例
xorBy source npm
+-xorBy source npm
_.xorBy([arrays], [iteratee=_.identity])This method is like
_.xor
except that it acceptsiteratee
which is @@ -2186,7 +2171,7 @@示例
xorWith source npm
+-xorWith source npm
_.xorWith([arrays], [comparator])This method is like
_.xor
except that it acceptscomparator
which is @@ -2213,7 +2198,7 @@示例
zip source npm
+-zip source npm
_.zip([arrays])Creates an array of grouped elements, the first of which contains the first @@ -2235,7 +2220,7 @@
示例
zipObject source npm
+-zipObject source npm
_.zipObject([props=[]], [values=[]])This method is like
_.fromPairs
except that it accepts two arrays, @@ -2258,7 +2243,7 @@示例
zipWith source npm
+-zipWith source npm
_.zipWith([arrays], [iteratee=_.identity])This method is like
_.zip
except that it acceptsiteratee
to specify @@ -2283,7 +2268,7 @@示例
_ source
+-_ source
_(value)Creates a
lodash
object which wrapsvalue
to enable implicit method @@ -2377,7 +2362,7 @@示例
chain source
+-chain source
_.chain(value)Creates a
lodash
object that wrapsvalue
with explicit method chaining enabled. @@ -2411,7 +2396,7 @@示例
prototype.at source
+-prototype.at source
_.prototype.at([paths])This method is the wrapper version of
@@ -2436,7 +2421,7 @@_.at
.示例
prototype.chain source
+-prototype.chain source
_.prototype.chain()Enables explicit method chaining on the wrapper object.
@@ -2465,7 +2450,7 @@示例
prototype.commit source
+-prototype.commit source
_.prototype.commit()Executes the chained sequence and returns the wrapped result.
@@ -2493,7 +2478,7 @@示例
prototype.next source
+-prototype.next source
_.prototype.next()Gets the next value on a wrapped object following the @@ -2517,7 +2502,7 @@
示例
prototype.plant source
+-prototype.plant source
_.prototype.plant(value)Creates a clone of the chained sequence planting
@@ -2547,7 +2532,7 @@value
as the wrapped value.示例
prototype.Symbol.iterator source
+-prototype.Symbol.iterator source
_.prototype.Symbol.iterator()Enables the wrapper to be iterable.
@@ -2567,7 +2552,7 @@示例
prototype.value run, toJSON, valueOf source
+-prototype.value run, toJSON, valueOf source
_.prototype.value()Executes the chained sequence to extract the unwrapped value.
@@ -2582,7 +2567,7 @@示例
tap source
+-tap source
_.tap(value, interceptor)This method invokes
interceptor
and returnsvalue
. The interceptor is @@ -2612,7 +2597,7 @@示例
thru source
+-thru source
_.thru(value, interceptor)This method is like
@@ -2640,7 +2625,7 @@_.tap
except that it returns the result ofinterceptor
.示例
wrapperFlatMap source
+-wrapperFlatMap source
_.wrapperFlatMap([iteratee=_.identity])This method is the wrapper version of
@@ -2664,7 +2649,7 @@_.flatMap
.示例
countBy source npm
+-countBy source npm
_.countBy(collection, [iteratee=_.identity])Creates an object composed of keys generated from the results of running @@ -2692,7 +2677,7 @@
示例
every source npm
+-every source npm
_.every(collection, [predicate=_.identity])Checks if
predicate
returns truthy for all elements ofcollection
. @@ -2733,7 +2718,7 @@示例
filter source npm
+-filter source npm
_.filter(collection, [predicate=_.identity])Iterates over elements of
collection
, returning an array of all elements @@ -2776,7 +2761,7 @@示例
find source npm
+-find source npm
_.find(collection, [predicate=_.identity])Iterates over elements of
collection
, returning the first element @@ -2820,7 +2805,7 @@示例
findLast source npm
+-findLast source npm
_.findLast(collection, [predicate=_.identity])This method is like
_.find
except that it iterates over elements of @@ -2845,7 +2830,7 @@示例
forEach each source npm
+-forEach each source npm
_.forEach(collection, [iteratee=_.identity])Iterates over elements of
collection
invokingiteratee
for each element. @@ -2881,7 +2866,7 @@示例
forEachRight eachRight source npm
+-forEachRight eachRight source npm
_.forEachRight(collection, [iteratee=_.identity])This method is like
_.forEach
except that it iterates over elements of @@ -2906,7 +2891,7 @@示例
groupBy source npm
+-groupBy source npm
_.groupBy(collection, [iteratee=_.identity])Creates an object composed of keys generated from the results of running @@ -2935,7 +2920,7 @@
示例
includes source npm
+-includes source npm
_.includes(collection, value, [fromIndex=0])Checks if
value
is incollection
. Ifcollection
is a string it's checked @@ -2971,7 +2956,7 @@示例
invokeMap source npm
+-invokeMap source npm
_.invokeMap(collection, path, [args])Invokes the method at
path
of each element incollection
, returning @@ -3001,7 +2986,7 @@示例
keyBy source npm
+-keyBy source npm
_.keyBy(collection, [iteratee=_.identity])Creates an object composed of keys generated from the results of running @@ -3036,7 +3021,7 @@
示例
map source npm
+-map source npm
_.map(collection, [iteratee=_.identity])Creates an array of values by running each element in
collection
through @@ -3087,7 +3072,7 @@示例
orderBy source npm
+-orderBy source npm
_.orderBy(collection, [iteratees=[_.identity]], [orders])This method is like
_.sortBy
except that it allows specifying the sort @@ -3124,7 +3109,7 @@示例
partition source npm
+-partition source npm
_.partition(collection, [predicate=_.identity])Creates an array of elements split into two groups, the first of which @@ -3171,7 +3156,7 @@
示例
reduce source npm
+-reduce source npm
_.reduce(collection, [iteratee=_.identity], [accumulator])Reduces
collection
to a value which is the accumulated result of running @@ -3217,7 +3202,7 @@示例
reduceRight source npm
+-reduceRight source npm
_.reduceRight(collection, [iteratee=_.identity], [accumulator])This method is like
_.reduce
except that it iterates over elements of @@ -3246,7 +3231,7 @@示例
reject source npm
+-reject source npm
_.reject(collection, [predicate=_.identity])The opposite of
_.filter
; this method returns the elements ofcollection
@@ -3288,7 +3273,7 @@示例
sample source npm
+-sample source npm
_.sample(collection)Gets a random element from
@@ -3308,7 +3293,7 @@collection
.示例
sampleSize source npm
+-sampleSize source npm
_.sampleSize(collection, [n=0])Gets
@@ -3330,7 +3315,7 @@n
random elements fromcollection
.示例
shuffle source npm
+-shuffle source npm
_.shuffle(collection)Creates an array of shuffled values, using a version of the @@ -3351,7 +3336,7 @@
示例
size source npm
+-size source npm
_.size(collection)Gets the size of
collection
by returning its length for array-like @@ -3378,7 +3363,7 @@示例
some source npm
+-some source npm
_.some(collection, [predicate=_.identity])Checks if
predicate
returns truthy for any element ofcollection
. @@ -3419,7 +3404,7 @@示例
sortBy source npm
+-sortBy source npm
_.sortBy(collection, [iteratees=[_.identity]])Creates an array of elements, sorted in ascending order by the results of @@ -3461,7 +3446,7 @@
示例
now source npm
+-now source npm
_.now()Gets the timestamp of the number of milliseconds that have elapsed since @@ -3479,7 +3464,7 @@
示例
after source npm
+-after source npm
_.after(n, func)The opposite of
_.before
; this method creates a function that invokes @@ -3510,7 +3495,7 @@示例
ary source npm
+-ary source npm
_.ary(func, [n=func.length])Creates a function that accepts up to
n
arguments, ignoring any @@ -3533,7 +3518,7 @@示例
before source npm
+-before source npm
_.before(n, func)Creates a function that invokes
func
, with thethis
binding and arguments @@ -3557,7 +3542,7 @@示例
bind source npm
+-bind source npm
_.bind(func, thisArg, [partials])Creates a function that invokes
func
with thethis
binding ofthisArg
@@ -3603,7 +3588,7 @@示例
bindKey source npm
+-bindKey source npm
_.bindKey(object, key, [partials])Creates a function that invokes the method at
object[key]
and prepends @@ -3658,7 +3643,7 @@示例
curry source npm
+-curry source npm
_.curry(func, [arity=func.length])Creates a function that accepts arguments of
func
and either invokes @@ -3707,7 +3692,7 @@示例
curryRight source npm
+-curryRight source npm
_.curryRight(func, [arity=func.length])This method is like
_.curry
except that arguments are applied tofunc
@@ -3753,7 +3738,7 @@示例
debounce source npm
+-debounce source npm
_.debounce(func, [wait=0], [options])Creates a debounced function that delays invoking
func
until afterwait
@@ -3813,7 +3798,7 @@示例
defer source npm
+-defer source npm
_.defer(func, [args])Defers invoking the
func
until the current call stack has cleared. Any @@ -3838,7 +3823,7 @@示例
delay source npm
+-delay source npm
_.delay(func, wait, [args])Invokes
func
afterwait
milliseconds. Any additional arguments are @@ -3865,7 +3850,7 @@示例
flip source npm
+-flip source npm
_.flip(func)Creates a function that invokes
@@ -3889,7 +3874,7 @@func
with arguments reversed.示例
memoize source npm
+-memoize source npm
_.memoize(func, [resolver])Creates a function that memoizes the result of
func
. Ifresolver
is @@ -3940,7 +3925,7 @@示例
negate source npm
+-negate source npm
_.negate(predicate)Creates a function that negates the result of the predicate
func
. The @@ -3966,7 +3951,7 @@示例
once source npm
+-once source npm
_.once(func)Creates a function that is restricted to invoking
func
once. Repeat calls @@ -3990,7 +3975,7 @@示例
overArgs source npm
+-overArgs source npm
_.overArgs(func, [transforms])Creates a function that invokes
func
with arguments transformed by @@ -4028,7 +4013,7 @@示例
partial source npm
+-partial source npm
_.partial(func, [partials])Creates a function that invokes
func
withpartial
arguments prepended @@ -4070,7 +4055,7 @@示例
partialRight source npm
+-partialRight source npm
_.partialRight(func, [partials])This method is like
_.partial
except that partially applied arguments @@ -4111,7 +4096,7 @@示例
rearg source npm
+-rearg source npm
_.rearg(func, indexes)Creates a function that invokes
func
with arguments arranged according @@ -4140,7 +4125,7 @@示例
rest source npm
+-rest source npm
_.rest(func, [start=func.length-1])Creates a function that invokes
func
with thethis
binding of the @@ -4171,7 +4156,7 @@示例
spread source npm
+-spread source npm
_.spread(func)Creates a function that invokes
func
with thethis
binding of the created @@ -4210,7 +4195,7 @@示例
throttle source npm
+-throttle source npm
_.throttle(func, [wait=0], [options])Creates a throttled function that only invokes
func
at most once per @@ -4261,7 +4246,7 @@示例
unary source npm
+-unary source npm
_.unary(func)Creates a function that accepts up to one argument, ignoring any @@ -4282,7 +4267,7 @@
示例
wrap source npm
+-wrap source npm
_.wrap(value, wrapper)Creates a function that provides
value
to the wrapper function as its @@ -4311,7 +4296,7 @@示例
-clone source npm
+clone source npm
_.clone(value)Creates a shallow clone of
value
. @@ -4320,11 +4305,10 @@示例
Note: This method is loosely based on the structured clone algorithm and supports cloning arrays, array buffers, booleans, date objects, maps, -numbers,Object
objects, regexes, sets, strings, symbols, and typed arrays. -The own enumerable properties ofarguments
objects and objects created -by constructors other thanObject
are cloned as plainObject
objects. -An empty object is returned for uncloneable values such as error objects, -functions, DOM nodes, and WeakMaps. +numbers,Object
objects, regexes, sets, strings, symbols, and typed +arrays. The own enumerable properties ofarguments
objects are cloned +as plain objects. An empty object is returned for uncloneable values such +as error objects, functions, DOM nodes, and WeakMaps.参数
@@ -4347,7 +4331,7 @@示例
cloneDeep source npm
+-cloneDeep source npm
_.cloneDeep(value)This method is like
@@ -4373,7 +4357,7 @@_.clone
except that it recursively clonesvalue
.示例
cloneDeepWith source npm
+-cloneDeepWith source npm
_.cloneDeepWith(value, [customizer])This method is like
@@ -4407,7 +4391,7 @@_.cloneWith
except that it recursively clonesvalue
.示例
- array (Array)
- array (Array)
- array (Array)
- array (Array)
- array (Array)
- array (Array)
- array (Array)
- array (Array)
- array (Array)
- array (Array)
- array (Array)
- array (Array)
- array (Array)