VERSION source
+VERSION source
(string): The semantic version number.
diff --git a/add.html b/add.html index 311554e..de10c1e 100644 --- a/add.html +++ b/add.html @@ -392,7 +392,7 @@add source npm
+add source npm
相加两个数
diff --git a/all.html b/all.html index 0002863..a110c3b 100644 --- a/all.html +++ b/all.html @@ -9883,7 +9883,7 @@示例
})();add source npm
+add source npm
相加两个数
@@ -9931,7 +9931,7 @@示例
})();ceil source npm
+ceil source npm
根据 precision
向上舍入 number
。
示例
})();floor source npm
+floor source npm
根据 precision
向下保留 number
。
示例
})();max source npm
+max source npm
计算 array
中最大的值。
@@ -10089,7 +10089,7 @@
示例
})();maxBy source npm
+maxBy source npm
这个方法类似 _.max
@@ -10148,7 +10148,7 @@
示例
})();mean source npm
+mean source npm
计算 array
的平均值。
示例
})();min source npm
+min source npm
计算 array 中最小的值。 如果 array 是 空的或者假值将会返回 undefined。
@@ -10243,7 +10243,7 @@示例
})();minBy source npm
+minBy source npm
这个方法类似 _.min
。
@@ -10301,7 +10301,7 @@
示例
})();round source npm
+round source npm
根据 precision 四舍五入 number。
@@ -10355,7 +10355,7 @@示例
})();subtract source npm
+subtract source npm
两双相减
@@ -10403,7 +10403,7 @@示例
})();sum source npm
+sum source npm
计算 array
中值的总和
示例
})();sumBy source npm
+sumBy source npm
这个方法类似 _.sum
。
@@ -10579,7 +10579,7 @@
返回值 (number)
})();clamp source npm
+clamp source npm
返回限制在 min
和 max
之间的值
示例
})();inRange source npm
+inRange source npm
检查 n
是否在 start
与 end
之间,但不包括 end
。
@@ -10702,7 +10702,7 @@
示例
})();random source npm
+random source npm
产生一个包括 min
与 max
之间的数。
@@ -10898,7 +10898,7 @@
示例
这个方法类似 _.assignIn
。
除了它接受一个 customizer决定如何分配值。
-如果
customizer返回
undefined将会分配处理方法代替。
customizer` 会传入5个参数:(objValue, srcValue, key, object, source)。
+如果customizer返回
undefined将会由分配处理方法代替。
customizer` 会传入5个参数:(objValue, srcValue, key, object, source)。
注意: 这方法会改变源对象
示例
这个方法类似 _.assign
。
除了它接受一个 customizer决定如何分配值。
-如果
customizer返回
undefined将会分配处理方法代替。
customizer` 会传入5个参数:(objValue, srcValue, key, object, source)。
+如果customizer返回
undefined将会由分配处理方法代替。
customizer` 会传入5个参数:(objValue, srcValue, key, object, source)。
注意: 这方法会改变源对象
示例
})();merge source npm
+merge source npm
Recursively merges own and inherited enumerable properties of source
-objects into the destination object, skipping source properties that resolve
-to undefined
. Array and plain object properties are merged recursively.
-Other objects and value types are overridden by assignment. Source objects
-are applied from left to right. Subsequent sources overwrite property
-assignments of previous sources.
+
递归合并来源对象的自身和继承的可枚举属性到目标对象。
+跳过来源对象解析为 undefined
的属性。
+数组和普通对象会递归合并,其他对象和值会被直接分配。
+来源对象从左到右分配,后续的来源对象属性会覆盖之前分配的属性。
注意: 这方法会改变源对象
示例
})();mergeWith source npm
+mergeWith source npm
这个方法类似 _.merge
except that it accepts customizer
which
-is invoked to produce the merged values of the destination and source
-properties. If customizer
returns undefined
merging is handled by the
-method instead. The customizer
is invoked with seven arguments:
-(objValue, srcValue, key, object, source, stack).
这个方法类似 _.merge
。
+除了它接受一个 customizer
决定如何合并。
+如果 customizer
返回 undefined
将会由合并处理方法代替。
参数
@@ -12302,7 +12298,7 @@参数
来源对象
The function to customize assigned values.
+这个方法决定如何合并
返回值 (Object)
@@ -12356,22 +12352,22 @@示例
})();omit source npm
+omit source npm
The opposite of _.pick
; this method creates an object composed of the
-own and inherited enumerable properties of object
that are not omitted.
反向版 _.pick
。
+这个方法返回忽略属性之外的自身和继承的可枚举属性。
参数
-
-
- object (Object)
The source object.
+- object (Object)
-来源对象
- [props] (...(string|string[])
The property names to omit, specified individually or in arrays..
+- [props] (...(string|string[])
要被忽略的属性,单独指定或指定在数组中
返回值 (Object)
-Returns the new object.
+返回新对象
示例
-var object = { 'user': 'fred', 'age': 40 }; @@ -12407,23 +12403,22 @@
示例
})();omitBy source npm
+omitBy source npm
_.omitBy(object, [predicate=_.identity])-The opposite of
+_.pickBy
; this method creates an object composed of the -own and inherited enumerable properties ofobject
thatpredicate
-doesn't return truthy for.反向版
_.pickBy
。 +这个方法返回经predicate
判断不是真值的属性的自身和继承的可枚举属性。参数
-
-
- object (Object)
The source object.
+- object (Object)
-来源对象
- [predicate=_.identity] (Function|Object|string)
The function invoked per property.
+- [predicate=_.identity] (Function|Object|string)
这个函数会调用每一个属性
返回值 (Object)
-Returns the new object.
+返回新对象
示例
-var object = { 'user': 'fred', 'age': 40 }; @@ -12459,21 +12454,21 @@
示例
})();pick source npm
+pick source npm
_.pick(object, [props])-Creates an object composed of the picked
+object
properties.创建一个从
object
中选中的属性的对象。参数
-
-
- object (Object)
The source object.
+- object (Object)
-来源对象
- [props] (...(string|string[])
The property names to pick, specified individually or in arrays.
+- [props] (...(string|string[])
要选中的属性名,单独指定或指定在数组中
返回值 (Object)
-Returns the new object.
+返回新对象
示例
-var object = { 'user': 'fred', 'age': 40 }; @@ -12509,22 +12504,22 @@
示例
})();pickBy source npm
+pickBy source npm
_.pickBy(object, [predicate=_.identity])-Creates an object composed of the
+object
propertiespredicate
returns -truthy for. The predicate is invoked with one argument: (value).创建一个从
object
中经predicate
判断为真值的属性为对象。 +predicate 会传入1个参数:(value)参数
-
-
- object (Object)
The source object.
+- object (Object)
-来源对象
- [predicate=_.identity] (Function|Object|string)
The function invoked per property.
+- [predicate=_.identity] (Function|Object|string)
这个函数会调用每一个属性
返回值 (Object)
-Returns the new object.
+返回新对象
示例
-var object = { 'user': 'fred', 'age': 40 }; @@ -12560,25 +12555,24 @@
示例
})();result source npm
+result source npm
_.result(object, path, [defaultValue])-这个方法类似
+_.get
except that if the resolved value is a function -it's invoked with thethis
binding of its parent object and its result -is returned.这个方法类似
_.get
。 +除了如果解析到的值是一个函数的话,就绑定this
到这个函数并返回执行后的结果。参数
- object (Object)
要检索的对象
- - path (Array|string)
The path of the property to resolve.
+- path (Array|string)
-要解析的属性路径
- [defaultValue] (*)
The value returned if the resolved value is
+undefined
.- [defaultValue] (*)
如果值是
undefined
,返回这个值返回值 (*)
-Returns the resolved value.
+返回解析后的值
示例
-var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; @@ -12623,22 +12617,21 @@
示例
})();set source npm
+set source npm
_.set(object, path, value)-Sets the value at
+path
ofobject
. If a portion ofpath
doesn't exist -it's created. Arrays are created for missing index properties while objects -are created for all other missing properties. Use_.setWith
to customize -path
creation.设置值到对象对应的属性路径上,如果没有则创建这部分路径。 +缺少的索引属性会创建为数组,而缺少的属性会创建为对象。 +使用
_.setWith
定制创建。参数
-
-
- object (Object)
The object to modify.
+- object (Object)
-要修改的对象
- path (Array|string)
The path of the property to set.
+- path (Array|string)
-要设置的对象路径
- value (*)
-The value to set.
+- value (*)
要设置的值
返回值 (Object)
@@ -12683,24 +12676,24 @@示例
})();setWith source npm
+setWith source npm
_.setWith(object, path, value, [customizer])-这个方法类似
+_.set
except that it acceptscustomizer
which is -invoked to produce the objects ofpath
. Ifcustomizer
returnsundefined
-path creation is handled by the method instead. Thecustomizer
is invoked -with three arguments: (nsValue, key, nsObject).这个方法类似
_.set
。 +除了它接受一个customizer
决定如何设置对象路径的值。 +如果customizer
返回undefined
将会有它的处理方法代替。 +customizer
会传入3个参数:(nsValue, key, nsObject)参数
-
-
- object (Object)
The object to modify.
+- object (Object)
-要修改的对象
- path (Array|string)
The path of the property to set.
+- path (Array|string)
-要设置的对象路径
- value (*)
The value to set.
+- value (*)
-要设置的值
- [customizer] (Function)
-The function to customize assigned values.
+- [customizer] (Function)
这个函数决定如何分配值
返回值 (Object)
@@ -12738,10 +12731,10 @@示例
})();toPairs source npm
+toPairs source npm
_.toPairs(object)-Creates an array of own enumerable key-value pairs for
+object
.创建一个对象自身可枚举属性的键值对数组。
参数
@@ -12750,7 +12743,7 @@参数
返回值 (Array)
-Returns the new array of key-value pairs.
+返回键值对的数组
示例
-function Foo() { @@ -12791,10 +12784,10 @@
示例
})();toPairsIn source npm
+toPairsIn source npm
_.toPairsIn(object)-Creates an array of own and inherited enumerable key-value pairs for
+object
.创建一个对象自身和继承的可枚举属性的键值对数组。
参数
@@ -12803,7 +12796,7 @@参数
返回值 (Array)
-Returns the new array of key-value pairs.
+返回键值对的数组
示例
-function Foo() { @@ -12844,15 +12837,14 @@
示例
})();transform source npm
+transform source npm
_.transform(object, [iteratee=_.identity], [accumulator])-An alternative to
+_.reduce
; this method transformsobject
to a new -accumulator
object which is the result of running each of its own enumerable -properties throughiteratee
, with each invocation potentially mutating -theaccumulator
object. The iteratee is invoked with four arguments:
-(accumulator, value, key, object). Iteratee functions may exit iteration -early by explicitly returningfalse
._.reduce
的代替方法。 +这个方法会改变对象为一个新的accumulator
对象,来自每一次经iteratee
处理自身可枚举对象的结果。 +每次调用可能会改变accumulator
对象。 +iteratee 会传入4个对象:(accumulator, value, key, object)。 +如果返回false
,iteratee 会提前退出。参数
@@ -12861,11 +12853,11 @@参数
- [iteratee=_.identity] (Function)
-这个函数会处理每一个元素
- [accumulator] (*)
The custom accumulator value.
+- [accumulator] (*)
定制叠加的值
返回值 (*)
-Returns the accumulated value.
+返回叠加后的值
示例
-_.transform([2, 3, 4], function(result, n) { @@ -12907,21 +12899,21 @@
示例
})();unset source npm
+unset source npm
_.unset(object, path)-Removes the property at
+path
ofobject
.移除对象路径的属性。
参数
-
-
- object (Object)
The object to modify.
+- object (Object)
-要修改的对象
- path (Array|string)
The path of the property to unset.
+- path (Array|string)
要移除的对象路径
返回值 (boolean)
-Returns
+true
if the property is deleted否则返回false
移除成功返回
true
,否则返回false
示例
-var object = { 'a': [{ 'b': { 'c': 7 } }] }; @@ -12965,13 +12957,13 @@
示例
})();values source npm
+values source npm
_.values(object)-Creates an array of the own enumerable property values of
object
. +创建
+注意: 非对象的值会强制转换为对象object
自身可枚举属性的值为数组
-注意: Non-object values are coerced to objects.参数
@@ -12980,7 +12972,7 @@参数
返回值 (Array)
-Returns the array of property values.
+返回对象属性的值的数组
示例
-function Foo() { @@ -13024,13 +13016,13 @@
示例
})();valuesIn source npm
+valuesIn source npm
_.valuesIn(object)--Creates an array of the own and inherited enumerable property values of
object
. +创建
+注意: 非对象的值会强制转换为对象object
自身和继承的可枚举属性的值为数组
-注意: Non-object values are coerced to objects.参数
@@ -13280,7 +13272,7 @@示例
})();VERSION source
+VERSION source
_.VERSION-(string): The semantic version number.
@@ -13313,7 +13305,7 @@示例
})();camelCase source npm
+camelCase source npm
_.camelCase([string=''])-Converts
@@ -13365,7 +13357,7 @@string
to camel case.示例
})();capitalize source npm
+capitalize source npm
_.capitalize([string=''])-Converts the first character of
string
to upper case and the remaining @@ -13412,7 +13404,7 @@示例
})();deburr source npm
+deburr source npm
_.deburr([string=''])-Deburrs
string
by converting latin-1 supplementary letters#Character_table) @@ -13459,7 +13451,7 @@示例
})();endsWith source npm
+endsWith source npm
_.endsWith([string=''], [target], [position=string.length])-Checks if
@@ -13515,7 +13507,7 @@string
ends with the given target string.示例
})();escape source npm
+escape source npm
_.escape([string=''])-Converts the characters "&", "<", ">", '"', "'", and "`" in
string
to @@ -13584,7 +13576,7 @@示例
})();escapeRegExp source npm
+escapeRegExp source npm
_.escapeRegExp([string=''])-Escapes the
RegExp
special characters "^", "$", "\", ".", "*", "+", @@ -13631,7 +13623,7 @@示例
})();kebabCase source npm
+kebabCase source npm
_.kebabCase([string=''])-Converts
@@ -13683,7 +13675,7 @@string
to kebab case.示例
})();lowerCase source npm
+lowerCase source npm
_.lowerCase([string=''])-Converts
@@ -13735,7 +13727,7 @@string
, as space separated words, to lower case.示例
})();lowerFirst source npm
+lowerFirst source npm
_.lowerFirst([string=''])-Converts the first character of
@@ -13784,7 +13776,7 @@string
to lower case.示例
})();pad source npm
+pad source npm
_.pad([string=''], [length=0], [chars=' '])-Pads
string
on the left and right sides if it's shorter thanlength
. @@ -13841,7 +13833,7 @@示例
})();padEnd source npm
+padEnd source npm
_.padEnd([string=''], [length=0], [chars=' '])-Pads
string
on the right side if it's shorter thanlength
. Padding @@ -13898,7 +13890,7 @@示例
})();padStart source npm
+padStart source npm
_.padStart([string=''], [length=0], [chars=' '])-Pads
string
on the left side if it's shorter thanlength
. Padding @@ -13955,7 +13947,7 @@示例
})();parseInt source npm
+parseInt source npm
_.parseInt(string, [radix])-Converts
string
to an integer of the specified radix. Ifradix
is @@ -14012,7 +14004,7 @@示例
})();repeat source npm
+repeat source npm
_.repeat([string=''], [n=0])-Repeats the given string
@@ -14066,7 +14058,7 @@n
times.示例
})();replace source npm
+replace source npm
_.replace([string=''], pattern, replacement)-Replaces matches for
pattern
instring
withreplacement
. @@ -14119,7 +14111,7 @@示例
})();snakeCase source npm
+snakeCase source npm
_.snakeCase([string=''])-Converts
@@ -14171,7 +14163,7 @@string
to snake case.示例
})();split source npm
+split source npm
_.split([string=''], separator, [limit])-Splits
string
byseparator
. @@ -14224,7 +14216,7 @@示例
})();startCase source npm
+startCase source npm
_.startCase([string=''])-Converts
@@ -14276,7 +14268,7 @@string
to start case.示例
})();startsWith source npm
+startsWith source npm
_.startsWith([string=''], [target], [position=0])-Checks if
@@ -14332,7 +14324,7 @@string
starts with the given target string.示例
})();template source npm
+template source npm
_.template([string=''], [options])-Creates a compiled template function that can interpolate data properties @@ -14470,7 +14462,7 @@
示例
})();toLower source npm
+toLower source npm
_.toLower([string=''])-Converts
@@ -14522,7 +14514,7 @@string
, as a whole, to lower case.示例
})();toUpper source npm
+toUpper source npm
_.toUpper([string=''])-Converts
@@ -14574,7 +14566,7 @@string
, as a whole, to upper case.示例
})();trim source npm
+trim source npm
_.trim([string=''], [chars=whitespace])-Removes leading and trailing whitespace or specified characters from
@@ -14628,7 +14620,7 @@string
.示例
})();trimEnd source npm
+trimEnd source npm
_.trimEnd([string=''], [chars=whitespace])-Removes trailing whitespace or specified characters from
@@ -14679,7 +14671,7 @@string
.示例
})();trimStart source npm
+trimStart source npm
_.trimStart([string=''], [chars=whitespace])-Removes leading whitespace or specified characters from
@@ -14730,7 +14722,7 @@string
.示例
})();truncate source npm
+truncate source npm
_.truncate([string=''], [options])-Truncates
string
if it's longer than the given maximum string length. @@ -14803,7 +14795,7 @@示例
})();unescape source npm
+unescape source npm
_.unescape([string=''])-The inverse of
_.escape
; this method converts the HTML entities @@ -14855,7 +14847,7 @@示例
})();upperCase source npm
+upperCase source npm
_.upperCase([string=''])-Converts
@@ -14907,7 +14899,7 @@string
, as space separated words, to upper case.示例
})();upperFirst source npm
+upperFirst source npm
_.upperFirst([string=''])-Converts the first character of
@@ -14956,7 +14948,7 @@string
to upper case.示例
})();words source npm
+words source npm
_.words([string=''], [pattern])-Splits
@@ -15007,7 +14999,7 @@string
into an array of its words.示例
})();attempt source npm
+attempt source npm
_.attempt(func)-Attempts to invoke
func
, returning either the result or the caught error @@ -15060,7 +15052,7 @@示例
})();bindAll source npm
+bindAll source npm
_.bindAll(object, methodNames)-Binds methods of an object to the object itself, overwriting the existing @@ -15120,7 +15112,7 @@
示例
})();cond source npm
+cond source npm
_.cond(pairs)-Creates a function that iterates over
pairs
invoking the corresponding @@ -15181,7 +15173,7 @@示例
})();conforms source npm
+conforms source npm
_.conforms(source)-Creates a function that invokes the predicate properties of
source
with @@ -15234,7 +15226,7 @@示例
})();constant source npm
+constant source npm
_.constant(value)-Creates a function that returns
@@ -15283,7 +15275,7 @@value
.示例
})();flow source npm
+flow source npm
_.flow([funcs])-Creates a function that returns the result of invoking the provided @@ -15336,7 +15328,7 @@
示例
})();flowRight source npm
+flowRight source npm
_.flowRight([funcs])-这个方法类似
_.flow
except that it creates a function that @@ -15388,7 +15380,7 @@示例
})();identity source npm
+identity source npm
_.identity(value)-This method returns the first argument provided to it.
@@ -15436,7 +15428,7 @@示例
})();iteratee source npm
+iteratee source npm
_.iteratee([func=_.identity])-创建一个调用
func
的函数。 with the arguments of the created @@ -15503,7 +15495,7 @@示例
})();matches source npm
+matches source npm
_.matches(source)-Creates a function that performs a deep partial comparison between a given @@ -15559,7 +15551,7 @@
示例
})();matchesProperty source npm
+matchesProperty source npm
_.matchesProperty(path, srcValue)-Creates a function that performs a deep partial comparison between the @@ -15617,7 +15609,7 @@
示例
})();method source npm
+method source npm
_.method(path, [args])-Creates a function that invokes the method at
path
of a given object. @@ -15674,7 +15666,7 @@示例
})();methodOf source npm
+methodOf source npm
_.methodOf(object, [args])-The opposite of
_.method
; this method creates a function that invokes @@ -15730,7 +15722,7 @@示例
})();mixin source npm
+mixin source npm
_.mixin([object=lodash], source, [options])-Adds all own enumerable function properties of a source object to the @@ -15802,7 +15794,7 @@
示例
})();noConflict source npm
+noConflict source npm
_.noConflict()-Reverts the
_
variable to its previous value and returns a reference to @@ -15843,7 +15835,7 @@示例
})();noop source npm
+noop source npm
_.noop()-A no-operation function that returns
undefined
regardless of the @@ -15884,7 +15876,7 @@示例
})();nthArg source npm
+nthArg source npm
_.nthArg([n=0])-Creates a function that returns its nth argument.
@@ -15932,7 +15924,7 @@示例
})();over source npm
+over source npm
_.over(iteratees)-Creates a function that invokes
iteratees
with the arguments provided @@ -15981,7 +15973,7 @@示例
})();overEvery source npm
+overEvery source npm
_.overEvery(predicates)-Creates a function that checks if all of the
predicates
return @@ -16036,7 +16028,7 @@示例
})(); - object (Object)
- object (Object)
- object (Object)
- path (Array|string)
- object (Object)
- object (Object)
- object (Object)
- object (Object)