VERSION source
+VERSION source
(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
相加两个数
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
相加两个数
@@ -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
之间的数。
@@ -11015,21 +11015,21 @@
示例
})();at source npm
+at source npm
Creates an array of values corresponding to paths
of object
.
根据 object
的路径获取值为数组。
参数
-
-
- object (Object)
The object to iterate over.
+- object (Object)
-要遍历的对象
- [paths] (...(string|string[])
The property paths of elements to pick, specified individually or in arrays.
+- [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 aproperties
-object is provided its own enumerable properties are assigned to the created object.创建一个继承
prototype
的对象。 +如果提供了properties
,它的可枚举属性会被分配到创建的对象上。参数
-
-
- prototype (Object)
The object to inherit from.
+- prototype (Object)
-要继承的对象
- [properties] (Object)
The properties to assign to the object.
+- [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. +-分配来源对象的可枚举属性到目标对象所有解析为
@@ -11188,11 +11187,10 @@undefined
的属性上。 +来源对象从左到右应用。 +一旦设置了相同属性的值,后续的将被忽略掉。
注意: 这方法会改变源对象示例
})();defaultsDeep source npm
+defaultsDeep source npm
_.defaultsDeep(object, [sources])-这个方法类似
_.defaults
except that it recursively assigns -default properties. +-这个方法类似
@@ -11240,22 +11238,22 @@_.defaults
,除了它会递归分配默认属性。
注意: 这方法会改变源对象示例
})();findKey source npm
+findKey source npm
_.findKey(object, [predicate=_.identity])-这个方法类似
+_.find
except that it returns the key of the first -elementpredicate
returns truthy for instead of the element itself.这个方法类似
_.find
。 +除了它返回最先被predicate
判断为真值的元素 key,而不是元素本身。参数
-
-
- object (Object)
The object to search.
+- object (Object)
需要检索的对象
- [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
。 +不过它是反方向开始遍历的。参数
-
-
- object (Object)
The object to search.
+- object (Object)
需要检索的对象
- [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 -returningfalse
.使用
iteratee
遍历对象的自身和继承的可枚举属性。 +iteratee 会传入3个参数:(value, key, object)。 +如果返回 false,iteratee 会提前退出遍历。参数
-
-
- object (Object) @@ -11434,16 +11431,16 @@
The object to iterate over.
+- object (Object)
要遍历的对象
- [iteratee=_.identity] (Function)
@@ -11404,7 +11401,7 @@这个函数会处理每一个元素
示例
_.forIn(new Foo, function(value, key) { console.log(key); }); -// => logs 'a', 'b', then 'c' (无法保证遍历的顺序) +// => 输出 'a', 'b', 然后 'c' (无法保证遍历的顺序)示例
})(); - object (Object)
forInRight source npm
+forInRight source npm
_.forInRight(object, [iteratee=_.identity])--这个方法类似
+_.forIn
except that it iterates over properties of -object
in the opposite order.这个方法类似
_.forIn
。 +除了它是反方向开始遍历的。参数
-
-
- object (Object) @@ -11492,18 +11489,16 @@
The object to iterate over.
+- object (Object)
要遍历的对象
- [iteratee=_.identity] (Function)
@@ -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'示例
})(); - object (Object)
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 returningfalse
.使用
iteratee
遍历自身的可枚举属性。 +iteratee 会传入3个参数:(value, key, object)。 如果返回 false,iteratee 会提前退出遍历。参数
-
-
- object (Object) @@ -11552,16 +11547,15 @@
The object to iterate over.
+- object (Object)
要遍历的对象
- [iteratee=_.identity] (Function)
@@ -11522,7 +11517,7 @@这个函数会处理每一个元素
示例
_.forOwn(new Foo, function(value, key) { console.log(key); }); -// => logs 'a' then 'b' (无法保证遍历的顺序) +// => 输出 'a' 然后 'b' (无法保证遍历的顺序)示例
})(); - object (Object)
forOwnRight source npm
+forOwnRight source npm
_.forOwnRight(object, [iteratee=_.identity])--这个方法类似
+_.forOwn
except that it iterates over properties of -object
in the opposite order.这个方法类似
_.forOwn
。 除了它是反方向开始遍历的。参数
-
-
- object (Object) @@ -11610,20 +11604,19 @@
The object to iterate over.
+- object (Object)
要遍历的对象
- [iteratee=_.identity] (Function)
@@ -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'示例
})(); - object (Object)
functions source npm
+functions source npm
_.functions(object)-Creates an array of function property names from own enumerable properties -of
+object
.返回一个 function 对象自身可枚举属性名的数组。
参数
-
-
- object (Object)
The object to inspect.
+- 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 对象自身和继承的可枚举属性名的数组。
参数
-
-
- object (Object)
The object to inspect.
+- 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
ofobject
. If the resolved value is -undefined
thedefaultValue
is used in its place.根据对象路径获取值。 +如果解析 value 是
undefined
会以defaultValue
取代。参数
-
-
- object (Object)
The object to query.
+- object (Object)
-要检索的对象
- path (Array|string)
The path of the property to get.
+- path (Array|string)
-要获取的对象路径
- [defaultValue] (*)
The value returned if the resolved value is
+undefined
.- [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 ofobject
.检查
path
是否是对象的直接属性。参数
-
-
- object (Object)
The object to query.
+- object (Object)
-要检索的对象
- path (Array|string)
The path to check.
+- path (Array|string)
要检查的路径
返回值 (boolean)
-Returns
+true
ifpath
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 ofobject
.检查
path
是否是对象的直接 或者 继承属性。参数
-
-
- object (Object)
The object to query.
+- object (Object)
-要检索的对象
- path (Array|string)
The path to check.
+- path (Array|string)
要检查的路径
返回值 (boolean)
-Returns
+true
ifpath
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
. -Ifobject
contains duplicate values, subsequent values overwrite property -assignments of previous values unlessmultiVal
istrue
.创建一个键值倒置的对象。 +如果
object
有重复的值,后面的值会覆盖前面的值。 +如果multiVal
为 true,重复的值则组成数组。参数
-
-
- object (Object)
The object to invert.
+- object (Object)
-要倒置的对象
- [multiVal] (boolean)
Allow multiple values per key.
+- [multiVal] (boolean)
每个 key 允许多个值
返回值 (Object)
-Returns the new inverted object.
+返回新的倒置的对象
示例
-
@@ -11952,23 +11944,23 @@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'] }示例
})();invoke source npm
+invoke source npm
_.invoke(object, path, [args])-Invokes the method at
+path
ofobject
.调用对象路径的方法
参数
-
-
- object (Object)
The object to query.
+- object (Object)
-要检索的对象
- path (Array|string)
The path of the method to invoke.
+- path (Array|string)
-要调用方法的路径
- [args] (...*)
The arguments to invoke the method with.
+- [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.参数
-
-
- object (Object)
The object to query.
+- 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.参数
-
-
- object (Object)
The object to query.
+- 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 asobject
and keys generated by running each own enumerable -property ofobject
throughiteratee
.反向版
_.mapValues
。 +这个方法创建一个对象,对象的值与源对象相同,但 key 是通过iteratee
产生的。参数
-
-
- object (Object)
The object to iterate over.
+- object (Object)
要遍历的对象
- [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 ofobject
throughiteratee
. The -iteratee function is invoked with three arguments: (value, key, object).创建一个对象,对象的key相同,值是通过
iteratee
产生的。 +iteratee 会传入3个参数: (value, key, object)参数
-
-
- object (Object)
The object to iterate over.
+- object (Object)
要遍历的对象
- [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 acceptscustomizer
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
@@ -12519,7 +12509,7 @@object
properties.示例
})();pickBy source npm
+pickBy source npm
_.pickBy(object, [predicate=_.identity])-Creates an object composed of the
object
propertiespredicate
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 @@示例
参数
-
-
- object (Object) -
The object to query.
+- object (Object)
要检索的对象
- path (Array|string)
@@ -12633,7 +12623,7 @@The path of the property to resolve.
示例
})();set source npm
+set source npm
_.set(object, path, value)-Sets the value at
path
ofobject
. If a portion ofpath
doesn't exist @@ -12693,7 +12683,7 @@示例
})();setWith source npm
+setWith source npm
_.setWith(object, path, value, [customizer])-这个方法类似
_.set
except that it acceptscustomizer
which is @@ -12748,7 +12738,7 @@示例
})();toPairs source npm
+toPairs source npm
_.toPairs(object)Creates an array of own enumerable key-value pairs for
@@ -12756,7 +12746,7 @@object
.示例
参数
-
-
- object (Object) -
The object to query.
+- 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
@@ -12809,7 +12799,7 @@object
.示例
参数
-
-
- object (Object) -
The object to query.
+- object (Object)
要检索的对象
返回值 (Array)
@@ -12854,7 +12844,7 @@示例
})();transform source npm
+transform source npm
_.transform(object, [iteratee=_.identity], [accumulator])An alternative to
_.reduce
; this method transformsobject
to a new @@ -12867,7 +12857,7 @@示例
参数
-
-
- object (Array|Object) -
The object to iterate over.
+- object (Array|Object)
要遍历的对象
- [iteratee=_.identity] (Function)
@@ -12917,7 +12907,7 @@这个函数会处理每一个元素
示例
})();unset source npm
+unset source npm
_.unset(object, path)-Removes the property at
@@ -12975,7 +12965,7 @@path
ofobject
.示例
})();values source npm
+values source npm
_.values(object)Creates an array of the own enumerable property values of
object
. @@ -12986,7 +12976,7 @@示例
参数
-
-
- object (Object) -
The object to query.
+- 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 @@示例
参数
-
-
- object (Object) -
The object to query.
+- 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
@@ -13375,7 +13365,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 @@ -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
@@ -13525,7 +13515,7 @@string
ends with the given target string.示例
})();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 @@示例
})(); - object (Object)
- object (Object)
- object (Array|Object)
- object (Object)
- object (Object)
- object (Object)
- object (Object)
- object (Object)
- object (Object)
- object (Object)
- object (Object)
- object (Object)
- object (Object)
- object (Object)
- object (Object)
- object (Object)
- object (Object)
- object (Object)
- object (Object)
- prototype (Object)
- object (Object)