VERSION source
+VERSION source
(string): The semantic version number.
diff --git a/add.html b/add.html index e802805..1b1b4bd 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 d676896..eae39cf 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 633dbad..f4a6e52 100644
--- a/all.html
+++ b/all.html
@@ -4778,7 +4778,7 @@
示例
orderBy source npm
这个方法类似 _.sortBy
,除了它允许以 iteratees 来指定排序规则。
+
这个方法类似 _.sortBy
,除了它允许指定 iteratees 结果如何排序。
如果没指定 orders
,所有值以升序排序。
其他情况,指定 "desc" 降序,指定 "asc" 升序其对应值。
示例
})();partition source npm
+partition source npm
Creates an array of elements split into two groups, the first of which
-contains elements predicate
returns truthy for, while the second of which
-contains elements predicate
returns falsey for. The predicate is invoked
-with three arguments: (value, index|key, collection).
创建一个拆分为两部分的数组。
+第一部分是 predicate
检查为真值的,第二部分是 predicate
检查为假值的。
+predicate 会传入3个参数:(value, index|key, collection)。
参数
@@ -4849,7 +4848,7 @@参数
返回值 (Array)
-Returns the array of grouped elements.
+返回分组元素的数组
示例
var resolve = function(result) {
@@ -4900,24 +4899,22 @@ 示例
})();
reduce source npm
+reduce source npm
Reduces collection
to a value which is the accumulated result of running
-each element in collection
through iteratee
, where each successive
-invocation is supplied the return value of the previous. If accumulator
-is not provided the first element of collection
is used as the initial
-value. The iteratee is invoked with four arguments:
-(accumulator, value, index|key, collection).
+
通过 iteratee
遍历集合中的每个元素。
+每次返回的值会作为下一次 iteratee
使用。
+如果没有提供 accumulator
,则集合中的第一个元素作为 accumulator
。
+iteratee 会传入4个参数:(accumulator, value, index|key, collection)。
-Many lodash methods are guarded to work as iteratees for methods like
-_.reduce
, _.reduceRight
, and _.transform
.
+有许多 lodash 的方法以 iteratees 的身份守护其工作,例如:
+_.reduce
, _.reduceRight
, 以及 _.transform
.
-The guarded methods are:
+被守护的有:
assign
, defaults
, defaultsDeep
, includes
, merge
, orderBy
,
-and sortBy
sortBy
参数
@@ -4926,11 +4923,11 @@参数
这个函数会处理每一个元素
The initial value.
+初始化的值
返回值 (*)
-Returns the accumulated value.
+返回累加后的值
示例
_.reduce([1, 2], function(sum, n) {
@@ -4967,11 +4964,10 @@ 示例
})();
reduceRight source npm
+reduceRight source npm
This method is like _.reduce
except that it iterates over elements of
-collection
from right to left.
这个方法类似 _.reduce
,除了它是从右到左遍历的。
参数
@@ -4980,11 +4976,11 @@参数
这个函数会处理每一个元素
The initial value.
+初始化的值
返回值 (*)
-Returns the accumulated value.
+返回累加后的值
示例
var array = [[0, 1], [2, 3], [4, 5]];
@@ -5017,11 +5013,10 @@ 示例
})();
reject source npm
+reject source npm
The opposite of _.filter
; this method returns the elements of collection
-that predicate
does not return truthy for.
反向版 _.filter
,这个方法返回 predicate
检查为非真值的元素。
参数
@@ -5032,7 +5027,7 @@参数
返回值 (Array)
-Returns the new filtered array.
+返回过滤后的新数组
示例
var resolve = _.partial(_.map, _, 'user');
@@ -5080,19 +5075,19 @@ 示例
})();
sample source npm
+sample source npm
Gets a random element from collection
.
从集合中随机获得元素
参数
-
-
- collection (Array|Object)
The collection to sample.
+- collection (Array|Object)
要取样的集合
返回值 (*)
-Returns the random element.
+返回随机元素
示例
-_.sample([1, 2, 3, 4]); @@ -5121,21 +5116,22 @@
示例
})();sampleSize source npm
+sampleSize source npm
_.sampleSize(collection, [n=0])-Gets
+n
random elements fromcollection
.获得从集合中随机获得
N
个元素 +Getsn
random elements fromcollection
.参数
-
-
- collection (Array|Object)
The collection to sample.
+- collection (Array|Object)
-要取样的集合
- [n=0] (number)
The number of elements to sample.
+- [n=0] (number)
要取得的元素个数
返回值 (Array)
-Returns the random elements.
+返回随机元素
示例
-_.sampleSize([1, 2, 3, 4], 2); @@ -5164,20 +5160,20 @@
示例
})();shuffle source npm
+shuffle source npm
_.shuffle(collection)-Creates an array of shuffled values, using a version of the -Fisher-Yates shuffle.
+创建一个被打乱元素的集合。 +使用了 Fisher-Yates shuffle 版本。
参数
-
-
- collection (Array|Object)
The collection to shuffle.
+- collection (Array|Object)
要打乱的集合
返回值 (Array)
-Returns the new shuffled array.
+返回一个被打乱元素的新集合
示例
-_.shuffle([1, 2, 3, 4]); @@ -5206,20 +5202,19 @@
示例
})();size source npm
+size source npm
_.size(collection)-Gets the size of
+collection
by returning its length for array-like -values or the number of own enumerable properties for objects.返回集合的长度或对象中可枚举属性的个数。
参数
-
-
- collection (Array|Object)
The collection to inspect.
+- collection (Array|Object)
待处理的集合
返回值 (number)
-Returns the collection size.
+返回集合的大小
示例
-_.size([1, 2, 3]); @@ -5254,12 +5249,11 @@
示例
})();some source npm
+some source npm
_.some(collection, [predicate=_.identity])-Checks if
+predicate
returns truthy for any element ofcollection
. -Iteration is stopped oncepredicate
returns truthy. The predicate is -invoked with three arguments: (value, index|key, collection).通过 predicate 检查集合中的元素是否存在任意真值的元素,只要 predicate 返回一次真值,遍历就停止,并返回 true。 +predicate 会传入3个参数:(value, index|key, collection)。
参数
@@ -5270,7 +5264,7 @@参数
返回值 (boolean)
-Returns
+true
if any element passes the predicate check, elsefalse
.返回 true,如果任意元素经 predicate 检查都为真值,否则返回 false。
示例
-_.some([null, 0, 'yes', false], Boolean); @@ -5316,24 +5310,24 @@
示例
})();sortBy source npm
+sortBy source npm
_.sortBy(collection, [iteratees=[_.identity]])-Creates an array of elements, sorted in ascending order by the results of -running each element in a collection through each iteratee. This method -performs a stable sort, that is, it preserves the original sort order of -equal elements. The iteratees are invoked with one argument: (value).
+创建一个元素数组。 +以 iteratee 处理的结果升序排序。 +这个方法执行稳定排序,也就是说相同元素会保持原始排序。 +iteratees 会传入1个参数:(value)。
参数
- collection (Array|Object)
需要遍历的集合
- - [iteratees=[_.identity]] (...(Function|Function[]|Object|Object[]|string|string[])
The iteratees to sort by, specified individually or in arrays.
+- [iteratees=[_.identity]] (...(Function|Function[]|Object|Object[]|string|string[])
这个函数决定排序
返回值 (Array)
-Returns the new sorted array.
+返回排序后的数组
示例
-var resolve = _.partial(_.map, _, _.values); @@ -5379,21 +5373,20 @@
示例
})();now source npm
+now source npm
_.now()-Gets the timestamp of the number of milliseconds that have elapsed since -the Unix epoch (1 January 1970 00:00:00 UTC).
+获得 Unix 纪元(1970 1月1日 00:00:00 UTC) 直到现在的毫秒数。
返回值 (number)
--Returns the timestamp.
+返回时间戳
示例
@@ -5418,7 +5411,7 @@_.defer(function(stamp) { console.log(_.now() - stamp); }, _.now()); -// => logs the number of milliseconds it took for the deferred function to be invoked +// => 记录延迟函数调用的毫秒数
示例
})();after source npm
+after source npm
_.after(n, func)-The opposite of
_.before
; this method creates a function that invokes @@ -5470,7 +5463,7 @@示例
})();ary source npm
+ary source npm
_.ary(func, [n=func.length])-Creates a function that accepts up to
n
arguments, ignoring any @@ -5514,7 +5507,7 @@示例
})();before source npm
+before source npm
_.before(n, func)-Creates a function that invokes
func
, with thethis
binding and arguments @@ -5559,7 +5552,7 @@示例
})();bind source npm
+bind source npm
_.bind(func, thisArg, [partials])-Creates a function that invokes
func
with thethis
binding ofthisArg
@@ -5626,7 +5619,7 @@示例
})();bindKey source npm
+bindKey source npm
_.bindKey(object, key, [partials])-Creates a function that invokes the method at
object[key]
and prepends @@ -5702,7 +5695,7 @@示例
})();curry source npm
+curry source npm
_.curry(func, [arity=func.length])-Creates a function that accepts arguments of
func
and either invokes @@ -5772,7 +5765,7 @@示例
})();curryRight source npm
+curryRight source npm
_.curryRight(func, [arity=func.length])-This method is like
_.curry
except that arguments are applied tofunc
@@ -5839,7 +5832,7 @@示例
})();debounce source npm
+debounce source npm
_.debounce(func, [wait=0], [options])-Creates a debounced function that delays invoking
func
until afterwait
@@ -5920,7 +5913,7 @@示例
})();defer source npm
+defer source npm
_.defer(func, [args])-Defers invoking the
func
until the current call stack has cleared. Any @@ -5966,7 +5959,7 @@示例
})();delay source npm
+delay source npm
_.delay(func, wait, [args])-Invokes
func
afterwait
milliseconds. Any additional arguments are @@ -6014,7 +6007,7 @@示例
})();flip source npm
+flip source npm
_.flip(func)-Creates a function that invokes
@@ -6059,7 +6052,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 @@ -6131,7 +6124,7 @@示例
})();negate source npm
+negate source npm
_.negate(predicate)-Creates a function that negates the result of the predicate
func
. The @@ -6178,7 +6171,7 @@示例
})();once source npm
+once source npm
_.once(func)-Creates a function that is restricted to invoking
func
once. Repeat calls @@ -6223,7 +6216,7 @@示例
})();overArgs source npm
+overArgs source npm
_.overArgs(func, [transforms])-Creates a function that invokes
func
with arguments transformed by @@ -6282,7 +6275,7 @@示例
})();partial source npm
+partial source npm
_.partial(func, [partials])-Creates a function that invokes
func
withpartial
arguments prepended @@ -6345,7 +6338,7 @@示例
})();partialRight source npm
+partialRight source npm
_.partialRight(func, [partials])-This method is like
_.partial
except that partially applied arguments @@ -6407,7 +6400,7 @@示例
})();rearg source npm
+rearg source npm
_.rearg(func, indexes)-Creates a function that invokes
func
with arguments arranged according @@ -6457,7 +6450,7 @@示例
})();rest source npm
+rest source npm
_.rest(func, [start=func.length-1])-Creates a function that invokes
func
with thethis
binding of the @@ -6509,7 +6502,7 @@示例
})();spread source npm
+spread source npm
_.spread(func)-Creates a function that invokes
func
with thethis
binding of the created @@ -6569,7 +6562,7 @@示例
})();throttle source npm
+throttle source npm
_.throttle(func, [wait=0], [options])-Creates a throttled function that only invokes
func
at most once per @@ -6641,7 +6634,7 @@示例
})();unary source npm
+unary source npm
_.unary(func)-Creates a function that accepts up to one argument, ignoring any @@ -6683,7 +6676,7 @@
示例
})();wrap source npm
+wrap source npm
_.wrap(value, wrapper)-Creates a function that provides
value
to the wrapper function as its @@ -6733,7 +6726,7 @@示例
})();clone source npm
+clone source npm
_.clone(value)-Creates a shallow clone of
value
. @@ -6789,7 +6782,7 @@示例
})();cloneDeep source npm
+cloneDeep source npm
_.cloneDeep(value)-This method is like
@@ -6836,7 +6829,7 @@_.clone
except that it recursively clonesvalue
.示例
})();cloneDeepWith source npm
+cloneDeepWith source npm
_.cloneDeepWith(value, [customizer])-This method is like
@@ -6891,7 +6884,7 @@_.cloneWith
except that it recursively clonesvalue
.示例
})();cloneWith source npm
+cloneWith source npm
_.cloneWith(value, [customizer])-This method is like
_.clone
except that it acceptscustomizer
which @@ -6949,7 +6942,7 @@示例
})();eq source npm
+eq source npm
_.eq(value, other)-Performs a
SameValueZero
@@ -7008,7 +7001,7 @@示例
})();gt source npm
+gt source npm
_.gt(value, other)-Checks if
@@ -7057,7 +7050,7 @@value
is greater thanother
.示例
})();gte source npm
+gte source npm
_.gte(value, other)-Checks if
@@ -7106,7 +7099,7 @@value
is greater than or equal toother
.示例
})();isArguments source npm
+isArguments source npm
_.isArguments(value)-Checks if
@@ -7150,7 +7143,7 @@value
is likely anarguments
object.示例
})();isArray source npm
+isArray source npm
_.isArray(value)-Checks if
@@ -7200,7 +7193,7 @@value
is classified as anArray
object.示例
})();isArrayLike source npm
+isArrayLike source npm
_.isArrayLike(value)-Checks if
value
is array-like. A value is considered array-like if it's @@ -7252,7 +7245,7 @@示例
})();isArrayLikeObject source npm
+isArrayLikeObject source npm
_.isArrayLikeObject(value)-This method is like
_.isArrayLike
except that it also checks ifvalue
@@ -7303,7 +7296,7 @@示例
})();isBoolean source npm
+isBoolean source npm
_.isBoolean(value)-Checks if
@@ -7347,7 +7340,7 @@value
is classified as a boolean primitive or object.示例
})();isDate source npm
+isDate source npm
_.isDate(value)-Checks if
@@ -7391,7 +7384,7 @@value
is classified as aDate
object.示例
})();isElement source npm
+isElement source npm
_.isElement(value)-Checks if
@@ -7435,7 +7428,7 @@value
is likely a DOM element.示例
})();isEmpty source npm
+isEmpty source npm
_.isEmpty(value)-Checks if
value
is empty. A value is considered empty unless it's an @@ -7490,7 +7483,7 @@示例
})();isEqual source npm
+isEqual source npm
_.isEqual(value, other)-Performs a deep comparison between two values to determine if they are @@ -7547,7 +7540,7 @@
示例
})();isEqualWith source npm
+isEqualWith source npm
_.isEqualWith(value, other, [customizer])-This method is like
_.isEqual
except that it acceptscustomizer
which is @@ -7608,7 +7601,7 @@示例
})();isError source npm
+isError source npm
_.isError(value)-Checks if
value
is anError
,EvalError
,RangeError
,ReferenceError
, @@ -7653,7 +7646,7 @@示例
})();isFinite source npm
+isFinite source npm
_.isFinite(value)-Checks if
value
is a finite primitive number. @@ -7706,7 +7699,7 @@示例
})();isFunction source npm
+isFunction source npm
_.isFunction(value)-Checks if
@@ -7750,7 +7743,7 @@value
is classified as aFunction
object.示例
})();isInteger source npm
+isInteger source npm
_.isInteger(value)-Checks if
value
is an integer. @@ -7803,7 +7796,7 @@示例
})();isLength source npm
+isLength source npm
_.isLength(value)-Checks if
value
is a valid array-like length. @@ -7856,7 +7849,7 @@示例
})();isMatch source npm
+isMatch source npm
_.isMatch(object, source)-Performs a deep comparison between
object
andsource
to determine if @@ -7908,7 +7901,7 @@示例
})();isMatchWith source npm
+isMatchWith source npm
_.isMatchWith(object, source, [customizer])-This method is like
_.isMatch
except that it acceptscustomizer
which @@ -7969,7 +7962,7 @@示例
})();isNaN source npm
+isNaN source npm
_.isNaN(value)-Checks if
value
isNaN
. @@ -8023,7 +8016,7 @@示例
})();isNative source npm
+isNative source npm
_.isNative(value)-Checks if
@@ -8067,7 +8060,7 @@value
is a native function.示例
})();isNil source npm
+isNil source npm
_.isNil(value)-Checks if
@@ -8114,7 +8107,7 @@value
isnull
orundefined
.示例
})();isNull source npm
+isNull source npm
_.isNull(value)-Checks if
@@ -8158,7 +8151,7 @@value
isnull
.示例
})();isNumber source npm
+isNumber source npm
_.isNumber(value)-Checks if
value
is classified as aNumber
primitive or object. @@ -8212,7 +8205,7 @@示例
})();isObject source npm
+isObject source npm
_.isObject(value)-Checks if
value
is the language type ofObject
. @@ -8263,7 +8256,7 @@示例
})();isObjectLike source npm
+isObjectLike source npm
_.isObjectLike(value)-Checks if
value
is object-like. A value is object-like if it's notnull
@@ -8314,7 +8307,7 @@示例
})();isPlainObject source npm
+isPlainObject source npm
_.isPlainObject(value)-Checks if
value
is a plain object, that is, an object created by the @@ -8369,7 +8362,7 @@示例
})();isRegExp source npm
+isRegExp source npm
_.isRegExp(value)-Checks if
@@ -8413,7 +8406,7 @@value
is classified as aRegExp
object.示例
})();isSafeInteger source npm
+isSafeInteger source npm
_.isSafeInteger(value)-Checks if
value
is a safe integer. An integer is safe if it's an IEEE-754 @@ -8467,7 +8460,7 @@示例
})();isString source npm
+isString source npm
_.isString(value)-Checks if
@@ -8511,7 +8504,7 @@value
is classified as aString
primitive or object.示例
})();isSymbol source npm
+isSymbol source npm
_.isSymbol(value)-Checks if
@@ -8555,7 +8548,7 @@value
is classified as aSymbol
primitive or object.示例
})();isTypedArray source npm
+isTypedArray source npm
_.isTypedArray(value)-Checks if
@@ -8599,7 +8592,7 @@value
is classified as a typed array.示例
})();isUndefined source npm
+isUndefined source npm
_.isUndefined(value)-Checks if
@@ -8643,7 +8636,7 @@value
isundefined
.示例
})();lt source npm
+lt source npm
_.lt(value, other)-Checks if
@@ -8692,7 +8685,7 @@value
is less thanother
.示例
})();lte source npm
+lte source npm
_.lte(value, other)-Checks if
@@ -8741,7 +8734,7 @@value
is less than or equal toother
.示例
})();toArray source npm
+toArray source npm
_.toArray(value)-Converts
@@ -8784,7 +8777,7 @@value
to an array.示例
})();toInteger source npm
+toInteger source npm
_.toInteger(value)-Converts
value
to an integer. @@ -8837,7 +8830,7 @@示例
})();toLength source npm
+toLength source npm
_.toLength(value)-Converts
value
to an integer suitable for use as the length of an @@ -8888,7 +8881,7 @@示例
})();toNumber source npm
+toNumber source npm
_.toNumber(value)-Converts
@@ -8938,7 +8931,7 @@value
to a number.示例
})();toPlainObject source npm
+toPlainObject source npm
_.toPlainObject(value)-Converts
value
to a plain object flattening inherited enumerable @@ -8989,7 +8982,7 @@示例
})();toSafeInteger source npm
+toSafeInteger source npm
_.toSafeInteger(value)-Converts
value
to a safe integer. A safe integer can be compared and @@ -9040,7 +9033,7 @@示例
})();toString source npm
+toString source npm
_.toString(value)-Converts
value
to a string if it's not one. An empty string is returned @@ -9088,7 +9081,7 @@示例
})();add source npm
+add source npm
_.add(augend, addend)-Adds two numbers.
@@ -9131,7 +9124,7 @@示例
})();ceil source npm
+ceil source npm
_.ceil(number, [precision=0])-Computes
@@ -9180,7 +9173,7 @@number
rounded up toprecision
.示例
})();floor source npm
+floor source npm
_.floor(number, [precision=0])-Computes
@@ -9229,7 +9222,7 @@number
rounded down toprecision
.示例
})();max source npm
+max source npm
_.max(array)-Computes the maximum value of
array
. Ifarray
is empty or falsey @@ -9274,7 +9267,7 @@示例
})();maxBy source npm
+maxBy source npm
_.maxBy(array, [iteratee=_.identity])-This method is like
_.max
except that it acceptsiteratee
which is @@ -9328,7 +9321,7 @@示例
})();mean source npm
+mean source npm
_.mean(array)-Computes the mean of the values in
@@ -9369,7 +9362,7 @@array
.示例
})();min source npm
+min source npm
_.min(array)-Computes the minimum value of
array
. Ifarray
is empty or falsey @@ -9414,7 +9407,7 @@示例
})();minBy source npm
+minBy source npm
_.minBy(array, [iteratee=_.identity])-This method is like
_.min
except that it acceptsiteratee
which is @@ -9468,7 +9461,7 @@示例
})();round source npm
+round source npm
_.round(number, [precision=0])-Computes
@@ -9517,7 +9510,7 @@number
rounded toprecision
.示例
})();subtract source npm
+subtract source npm
_.subtract(minuend, subtrahend)-Subtract two numbers.
@@ -9560,7 +9553,7 @@示例
})();sum source npm
+ - [iteratees=[_.identity]] (...(Function|Function[]|Object|Object[]|string|string[])
- collection (Array|Object)
- collection (Array|Object)
- collection (Array|Object)
- collection (Array|Object)