VERSION source
+VERSION source
(string): The semantic version number.
diff --git a/add.html b/add.html index a839e81..61403ec 100644 --- a/add.html +++ b/add.html @@ -392,21 +392,21 @@add source npm
+add source npm
Adds two numbers.
+相加两个数
参数
-
-
- augend (number)
The first number in an addition.
+- augend (number)
-相加的第一个数
- addend (number)
The second number in an addition.
+- addend (number)
相加的第二个数
返回值 (number)
-Returns the total.
+返回总和
示例
-_.add(6, 4); diff --git a/all.html b/all.html index 7e5ba66..9a27811 100644 --- a/all.html +++ b/all.html @@ -9883,21 +9883,21 @@
示例
})();add source npm
+add source npm
_.add(augend, addend)-Adds two numbers.
+相加两个数
参数
-
-
- augend (number)
The first number in an addition.
+- augend (number)
-相加的第一个数
- addend (number)
The second number in an addition.
+- addend (number)
相加的第二个数
返回值 (number)
-Returns the total.
+返回总和
示例
-_.add(6, 4); @@ -9931,21 +9931,21 @@
示例
})();ceil source npm
+ceil source npm
_.ceil(number, [precision=0])-Computes
+number
rounded up toprecision
.根据
precision
向上舍入number
。参数
-
-
- number (number)
The number to round up.
+- number (number)
-要向上舍入的值
- [precision=0] (number)
The precision to round up to.
+- [precision=0] (number)
精度
返回值 (number)
-Returns the rounded up number.
+返回向上舍入的结果
示例
-_.ceil(4.006); @@ -9985,21 +9985,21 @@
示例
})();floor source npm
+floor source npm
_.floor(number, [precision=0])-Computes
+number
rounded down toprecision
.根据
precision
向下保留number
。参数
-
-
- number (number)
The number to round down.
+- number (number)
-要向下保留的数
- [precision=0] (number)
The precision to round down to.
+- [precision=0] (number)
精度
返回值 (number)
-Returns the rounded down number.
+返回向下保留的结果
示例
-_.floor(4.006); @@ -10039,20 +10039,20 @@
示例
})();max source npm
+max source npm
_.max(array)-Computes the maximum value of
+array
. Ifarray
is empty or falsey -undefined
is returned.计算
array
中最大的值。 +如果array
是 空的或者假值将会返回 undefined。参数
-
-
- array (Array)
The array to iterate over.
+- array (Array)
要计算的数组
返回值 (*)
-Returns the maximum value.
+返回最大的值
示例
-_.max([4, 2, 8, 6]); @@ -10089,23 +10089,23 @@
示例
})();maxBy source npm
+maxBy source npm
_.maxBy(array, [iteratee=_.identity])-这个方法类似
+_.max
except that it acceptsiteratee
which is -invoked for each element inarray
to generate the criterion by which -the value is ranked. The iteratee 会传入1个参数:(value)。这个方法类似
_.max
+除了它接受iteratee
调用每一个元素,根据返回的 value 决定排序准则。 +iteratee 会传入1个参数:(value)。参数
-
-
- array (Array)
The array to iterate over.
+- array (Array)
要遍历的数组
- [iteratee=_.identity] (Function|Object|string)
这个函数会处理每一个元素
返回值 (*)
-Returns the maximum value.
+返回最大值
示例
-var users = [ @@ -10148,19 +10148,19 @@
示例
})();mean source npm
+mean source npm
_.mean(array)-Computes the mean of the values in
+array
.计算
array
的平均值。参数
-
-
- array (Array)
The array to iterate over.
+- array (Array)
要遍历的数组
返回值 (number)
-Returns the mean.
+返回平均值
示例
-_.mean([4, 2, 8, 6]); @@ -10194,20 +10194,19 @@
示例
})();min source npm
+min source npm
_.min(array)-Computes the minimum value of
+array
. Ifarray
is empty or falsey -undefined
is returned.计算 array 中最小的值。 如果 array 是 空的或者假值将会返回 undefined。
参数
-
-
- array (Array)
The array to iterate over.
+- array (Array)
要计算的数组
返回值 (*)
-Returns the minimum value.
+返回最小值
示例
-_.min([4, 2, 8, 6]); @@ -10244,23 +10243,22 @@
示例
})();minBy source npm
+minBy source npm
_.minBy(array, [iteratee=_.identity])-这个方法类似
+_.min
except that it acceptsiteratee
which is -invoked for each element inarray
to generate the criterion by which -the value is ranked. The iteratee 会传入1个参数:(value)。这个方法类似
_.min
。 +除了它接受 iteratee 调用每一个元素,根据返回的 value 决定排序准则。 iteratee 会传入1个参数:(value)。参数
-
-
- array (Array)
The array to iterate over.
+- array (Array)
要遍历的数组
- [iteratee=_.identity] (Function|Object|string)
这个函数会处理每一个元素
返回值 (*)
-Returns the minimum value.
+返回最小值
示例
-var users = [ @@ -10303,21 +10301,21 @@
示例
})();round source npm
+round source npm
_.round(number, [precision=0])-Computes
+number
rounded toprecision
.根据 precision 四舍五入 number。
参数
-
-
- number (number)
The number to round.
+- number (number)
-要四舍五入的值
- [precision=0] (number)
The precision to round to.
+- [precision=0] (number)
精度
返回值 (number)
-Returns the rounded number.
+返回四舍五入的结果
示例
-_.round(4.006); @@ -10357,21 +10355,21 @@
示例
})();subtract source npm
+subtract source npm
_.subtract(minuend, subtrahend)-Subtract two numbers.
+两双相减
参数
-
-
- minuend (number)
The first number in a subtraction.
+- minuend (number)
-相减的第一个数
- subtrahend (number)
The second number in a subtraction.
+- subtrahend (number)
相减的第二个数
返回值 (number)
-Returns the difference.
+返回结果
示例
-_.subtract(6, 4); @@ -10405,19 +10403,19 @@
示例
})();sum source npm
+sum source npm
_.sum(array)-Computes the sum of the values in
+array
.计算
array
中值的总和参数
-
-
- array (Array)
The array to iterate over.
+- array (Array)
要遍历的数组
返回值 (number)
-Returns the sum.
+返回总和
示例
-_.sum([4, 2, 8, 6]); @@ -10451,23 +10449,23 @@
示例
})();sumBy source npm
+sumBy source npm
_.sumBy(array, [iteratee=_.identity])-这个方法类似
+_.sum
except that it acceptsiteratee
which is -invoked for each element inarray
to generate the value to be summed. -The iteratee 会传入1个参数:(value)。这个方法类似
_.sum
。 +除了它接受 iteratee 调用每一个元素,根据返回的 value 决定如何计算。 +iteratee 会传入1个参数:(value)。参数
-
-
- array (Array)
The array to iterate over.
+- array (Array)
要遍历的数组
- [iteratee=_.identity] (Function|Object|string)
这个函数会处理每一个元素
返回值 (number)
-Returns the sum.
+返回总和
示例
var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; @@ -10510,16 +10508,16 @@
示例
stringSize source
stringSize(string)-Gets the number of symbols in
+string
.获得字符串的长度
参数
-
-
- string (string)
The string to inspect.
+- string (string)
要处理的字符串
返回值 (number)
--Returns the string size.
+返回字符串长度
clamp source npm
+clamp source npm
_.clamp(number, [min], max)-Returns a number whose value is limited to the given range specified -by
+min
andmax
.返回限制在
min
和max
之间的值参数
-
-
- number (number)
The number whose value is to be limited.
+- number (number)
-被限制的值
- [min] (number)
The minimum possible value.
+- [min] (number)
-最小绝对值
- max (number)
The maximum possible value.
+- max (number)
最大绝对值
返回值 (number)
-A number in the range [min, max].
+[min, max] 中的一个
示例
-_.clamp(-10, -5, 5); @@ -10635,26 +10632,25 @@
示例
})();inRange source npm
+inRange source npm
_.inRange(number, [start=0], end)-Checks if
+n
is betweenstart
and up to but not including,end
. If -end
is not specified it's set tostart
withstart
then set to0
. -Ifstart
is greater thanend
the params are swapped to support -negative ranges.检查
n
是否在start
与end
之间,但不包括end
。 +如果end
没有指定,那么start
设置为0。 +如果start
大于end
,那么参数会交换以便支持负范围。参数
-
-
- number (number)
The number to check.
+- number (number)
-要检查的值
- [start=0] (number)
The start of the range.
+- [start=0] (number)
-开始范围
- end (number)
The end of the range.
+- end (number)
结束范围
返回值 (boolean)
-Returns
+true
ifnumber
is in the range否则返回false
如果值在范围内返回
true
,否则返回false
示例
-_.inRange(3, 2, 4); @@ -10706,43 +10702,41 @@
示例
})();random source npm
+random source npm
_.random([min=0], [max=1], [floating])-Produces a random number between
min
andmax
(inclusive). If only one -argument is provided a number between0
and the given number is returned. -Iffloating
istrue
, or eithermin
ormax
are floats, a -floating-point number is returned instead of an integer. +产生一个包括
+注意: JavaScript 遵循 IEEE-754 标准处理无法预料的浮点数结果。min
与max
之间的数。 +如果只提供一个参数返回一个0到提供数之间的数。 +如果floating
设为 true,或者min
或max
是浮点数,结果返回浮点数。
-注意: JavaScript follows the IEEE-754 standard for resolving -floating-point values which can produce unexpected results.参数
-
-
- [min=0] (number)
The minimum possible value.
+- [min=0] (number)
-最小值
- [max=1] (number)
The maximum possible value.
+- [max=1] (number)
-最大值
- [floating] (boolean)
Specify returning a floating-point number.
+- [floating] (boolean)
是否返回浮点数
返回值 (number)
-Returns the random number.
+返回随机数
示例
@@ -10839,8 +10833,8 @@_.random(0, 5); -// => an integer between 0 and 5 +// => 0 和 5 之间的数 _.random(5); -// => also an integer between 0 and 5 +// => 同样是 0 和 5 之间的数 _.random(5, true); -// => a floating-point number between 0 and 5 +// => 0 和 5 之间的浮点数 _.random(1.2, 5.2); -// => a floating-point number between 1.2 and 5.2 +// => 1.2 和 5.2 之间的浮点数
示例
assignIn extend source npm
_.assignIn(object, [sources])-这个方法类似
_.assign
except that it iterates over own and -inherited source properties. +这个方法类似
@@ -10848,13 +10842,13 @@_.assign
。 +除了它会遍历并继承来源对象的属性。
注意: 这方法会改变源对象示例
参数
-
-
- object (Object)
The destination object.
+- object (Object)
-目标对象
- [sources] (...Object)
The source objects.
+- [sources] (...Object)
来源对象
返回值 (Object)
-Returns
+object
.返回对象
示例
function Foo() { @@ -10902,10 +10896,9 @@
示例
assignInWith extendWith source npm
_.assignInWith(object, sources, [customizer])-这个方法类似
_.assignIn
except that it acceptscustomizer
which -is invoked to produce the assigned values. Ifcustomizer
returnsundefined
-assignment is handled by the method instead. Thecustomizer
is invoked -with five arguments: (objValue, srcValue, key, object, source). +这个方法类似
@@ -10913,15 +10906,15 @@_.assignIn
。 +除了它接受一个 customizer决定如何分配值。 +如果
customizer返回
undefined将会分配处理方法代替。
customizer` 会传入5个参数:(objValue, srcValue, key, object, source)。
注意: 这方法会改变源对象示例
参数
-
-
- object (Object)
The destination object.
+- object (Object)
-目标对象
- sources (...Object)
The source objects.
+- sources (...Object)
-来源对象
- [customizer] (Function)
The function to customize assigned values.
+- [customizer] (Function)
这个函数决定分配的值
返回值 (Object)
-Returns
+object
.返回对象
示例
function customizer(objValue, srcValue) { @@ -10964,10 +10957,9 @@
示例
assignWith source npm
_.assignWith(object, sources, [customizer])-这个方法类似
_.assign
except that it acceptscustomizer
which -is invoked to produce the assigned values. Ifcustomizer
returnsundefined
-assignment is handled by the method instead. Thecustomizer
is invoked -with five arguments: (objValue, srcValue, key, object, source). +这个方法类似
@@ -10975,15 +10967,15 @@_.assign
。 +除了它接受一个 customizer决定如何分配值。 +如果
customizer返回
undefined将会分配处理方法代替。
customizer` 会传入5个参数:(objValue, srcValue, key, object, source)。
注意: 这方法会改变源对象示例
参数
-
-
- object (Object)
The destination object.
+- object (Object)
-目标对象
- sources (...Object)
The source objects.
+- sources (...Object)
-来源对象
- [customizer] (Function)
The function to customize assigned values.
+- [customizer] (Function)
这个函数决定分配的值
返回值 (Object)
-Returns
+object
.返回对象
示例
function customizer(objValue, srcValue) { @@ -11156,13 +11148,13 @@
示例
参数
-
-
- object (Object)
The destination object.
+- object (Object)
-目标对象
- [sources] (...Object)
The source objects.
+- [sources] (...Object)
来源对象
返回值 (Object)
-Returns
+object
.返回对象
示例
_.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); @@ -11208,13 +11200,13 @@
示例
参数
-
-
- object (Object)
The destination object.
+- object (Object)
-目标对象
- [sources] (...Object)
The source objects.
+- [sources] (...Object)
来源对象
返回值 (Object)
-Returns
+object
.返回对象
示例
_.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } }); @@ -11399,7 +11391,7 @@
参数
返回值 (Object)
-Returns
+object
.返回对象
示例
function Foo() { @@ -11457,7 +11449,7 @@
参数
返回值 (Object)
-Returns
+object
.返回对象
示例
function Foo() { @@ -11517,7 +11509,7 @@
参数
返回值 (Object)
-Returns
+object
.返回对象
示例
function Foo() { @@ -11575,7 +11567,7 @@
参数
返回值 (Object)
-Returns
+object
.返回对象
示例
function Foo() { @@ -12256,13 +12248,13 @@
示例
参数
-
-
- object (Object)
The destination object.
+- object (Object)
-目标对象
- [sources] (...Object)
The source objects.
+- [sources] (...Object)
来源对象
返回值 (Object)
-Returns
+object
.返回对象
示例
var users = { @@ -12316,15 +12308,15 @@
示例
参数
-
-
- object (Object)
The destination object.
+- object (Object)
-目标对象
- sources (...Object)
The source objects.
+ - object (Object)
- object (Object)
- object (Object)
- object (Object)
- object (Object)
- object (Object)
- object (Object)
- [min=0] (number)
- number (number)
- number (number)
- string (string)
- array (Array)
- array (Array)
- minuend (number)
- number (number)
- array (Array)
- array (Array)
- array (Array)
- array (Array)
- array (Array)
- number (number)
- number (number)
- augend (number)
- augend (number)