VERSION source
+VERSION source
(string): 语义化版本号
diff --git a/_.html b/_.html index 995064e..f2066a5 100644 --- a/_.html +++ b/_.html @@ -337,9 +337,9 @@add source npm
+add source npm
相加两个数
diff --git a/after.html b/after.html index 60cfc89..f3349d1 100644 --- a/after.html +++ b/after.html @@ -337,9 +337,9 @@示例
})();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
。
@@ -13271,7 +13271,7 @@
示例
})();VERSION source
+VERSION source
(string): 语义化版本号
@@ -13938,27 +13938,26 @@示例
})();parseInt source npm
+parseInt source npm
Converts string
to an integer of the specified radix. If radix
is
-undefined
or 0
, a radix
of 10
is used unless value
is a hexadecimal,
-in which case a radix
of 16
is used.
+
以指定的基数转换字符串为整数。
+如果基数是 undefined
或者 0,则基数默认是10,如果字符串是16进制,则基数为16。
-注意: This method aligns with the ES5 implementation
-of parseInt
.
parseInt
一致
参数
- string (string)
要转换的字符串
- - [radix] (number)
The radix to interpret
+value
by.- [radix] (number)
基数
返回值 (number)
-Returns the converted integer.
+返回转换后的整数
示例
-_.parseInt('08'); @@ -13995,21 +13994,21 @@
示例
})();repeat source npm
+repeat source npm
_.repeat([string=''], [n=0])-Repeats the given string
+n
times.重复 N 次字符串
参数
-
-
- [string=''] (string)
The string to repeat.
+- [string=''] (string)
-要重复的字符串
- [n=0] (number)
The number of times to repeat the string.
+- [n=0] (number)
重复的次数
返回值 (string)
-Returns the repeated string.
+返回重复的字符串
示例
-_.repeat('*', 3); @@ -14049,26 +14048,25 @@
示例
})();replace source npm
-_.replace([string=''], pattern, replacement)+replace source npm
+_.replace([string=''], pattern, 要替换的内容)-Replaces matches for
pattern
instring
withreplacement
. +替换字符串中匹配的内容为给定的内容
+注意: 这个方法基于
-注意: This method is based onString#replace
.String#replace
参数
-
-
- [string=''] (string)
The string to modify.
-
- - pattern (RegExp|string)
The pattern to replace.
+- [string=''] (string)
-待替换的字符串
- replacement (Function|string)
The match replacement.
+- pattern (RegExp|string)
+要匹配的内容
- 要替换的内容 (Function|string)
返回值 (string)
-Returns the modified string.
+返回替换完成的字符串
示例
-_.replace('Hi Fred', 'Fred', 'Barney'); @@ -14102,10 +14100,10 @@
示例
})();snakeCase source npm
+snakeCase source npm
_.snakeCase([string=''])-返回值 (string)
-Returns the snake cased string.
+返回转换后的字符串
示例
-_.snakeCase('Foo Bar'); @@ -14154,26 +14152,26 @@
示例
})();split source npm
-_.split([string=''], separator, [limit])+split source npm
+_.split([string=''], [separator], [limit])-Splits
string
byseparator
. +以
+注意: 这个方法基于separator
拆分字符串
-注意: This method is based onString#split
.String#split
参数
-
-
- [string=''] (string)
The string to split.
+- [string=''] (string)
-要拆分的字符串
- separator (RegExp|string)
The separator pattern to split by.
+- [separator] (RegExp|string)
-拆分的分隔符
- [limit] (number)
The length to truncate results to.
+- [limit] (number)
限制的数量
返回值 (Array)
-Returns the new array of string segments.
+返回拆分部分的字符串的数组
示例
-_.split('a-b-c', '-', 2); @@ -14207,10 +14205,10 @@
示例
})();startCase source npm
+startCase source npm
_.startCase([string=''])-返回值 (string)
-Returns the start cased string.
+返回转换后的字符串
示例
-_.startCase('--foo-bar'); @@ -14259,23 +14257,23 @@
示例
})();startsWith source npm
+startsWith source npm
_.startsWith([string=''], [target], [position=0])-Checks if
+string
starts with the given target string.检查字符串是否以
target
开头。参数
- [string=''] (string)
要检索的字符串
- - [target] (string)
The string to search for.
+- [target] (string)
要检查的字符串
- [position=0] (number)
检索的位置
返回值 (boolean)
-Returns
+true
ifstring
starts withtarget
否则返回false
如果符合条件返回
true
,否则返回false
示例
-_.startsWith('abc', 'a'); @@ -14315,100 +14313,100 @@
示例
})();template source npm
+template source npm
_.template([string=''], [options])-Creates a compiled template function that can interpolate data properties -in "interpolate" delimiters, HTML-escape interpolated data properties in -"escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data -properties may be accessed as free variables in the template. If a setting -object is provided it takes precedence over
_.templateSettings
values. +创建一个预编译模板方法,可以插入数据到模板中 "interpolate" 分隔符相应的位置。 +HTML会在 "escape" 分隔符中转换为相应实体。 +在 "evaluate" 分隔符中允许执行JavaScript代码。 +在模板中可以自由访问变量。 +如果设置了选项对象,则会优先覆盖
+了解更多 Chrome 沙箱扩展的信息查看 +Chrome的扩展文档_.templateSettings
的值。
-注意: In the development build_.template
utilizes +注意: 在开发过程中可以使用 sourceURLs -for easier debugging. +便于调试。
-For more information on precompiling templates see -lodash's custom builds documentation. +了解更多预编译模板的信息查看 +lodash的自定义构建文档
-For more information on Chrome extension sandboxes see -Chrome's extensions documentation.参数
-
-
- [string=''] (string)
The template string.
+- [string=''] (string)
-模板字符串
- [options] (Object)
The options object.
+- [options] (Object)
-选项对象
- [options.escape] (RegExp)
The HTML "escape" delimiter.
+- [options.escape] (RegExp)
-"escape" 分隔符
- [options.evaluate] (RegExp)
The "evaluate" delimiter.
+- [options.evaluate] (RegExp)
-"evaluate" 分隔符
- [options.imports] (Object)
An object to import into the template as free variables.
+- [options.imports] (Object)
-导入对象到模板中作为自由变量
- [options.interpolate] (RegExp)
The "interpolate" delimiter.
+- [options.interpolate] (RegExp)
-"interpolate" 分隔符
- [options.sourceURL] (string)
The sourceURL of the template's compiled source.
+- [options.sourceURL] (string)
-模板编译的来源URL
- [options.variable] (string)
The data object variable name.
+- [options.variable] (string)
数据对象的变量名
返回值 (Function)
-Returns the compiled template function.
+返回编译模板函数
示例
-// using the "interpolate" delimiter to create a compiled template +
-// 使用 "interpolate" 分隔符创建编译模板 var compiled = _.template('hello <%= user %>!'); compiled({ 'user': 'fred' }); // => 'hello fred!' -// using the HTML "escape" delimiter to escape data property values +// 使用 HTML "escape" 转义数据的值 var compiled = _.template('<b><%- value %></b>'); compiled({ 'value': '<script>' }); // => '<b><script></b>' -// using the "evaluate" delimiter to execute JavaScript and generate HTML +// 使用 "evaluate" 分隔符执行 JavaScript 和 生成HTML代码 var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>'); compiled({ 'users': ['fred', 'barney'] }); // => '<li>fred</li><li>barney</li>' -// using the internal `print` function in "evaluate" delimiters +// 在 "evaluate" 分隔符中使用内部的 `print` 函数 var compiled = _.template('<% print("hello " + user); %>!'); compiled({ 'user': 'barney' }); // => 'hello barney!' -// using the ES delimiter as an alternative to the default "interpolate" delimiter +// 使用 ES 分隔符代替默认的 "interpolate" 分隔符 var compiled = _.template('hello ${ user }!'); compiled({ 'user': 'pebbles' }); // => 'hello pebbles!' -// using custom template delimiters +// 使用自定义的模板分隔符 _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; var compiled = _.template('hello {{ user }}!'); compiled({ 'user': 'mustache' }); // => 'hello mustache!' -// using backslashes to treat delimiters as plain text +// 使用反斜杠符号作为纯文本处理 var compiled = _.template('<%= "\\<%- value %\\>" %>'); compiled({ 'value': 'ignored' }); // => '<%- value %>' -// using the `imports` option to import `jQuery` as `jq` +// 使用 `imports` 选项导入 `jq` 作为 `jQuery` 的别名 var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>'; var compiled = _.template(text, { 'imports': { 'jq': jQuery } }); compiled({ 'users': ['fred', 'barney'] }); // => '<li>fred</li><li>barney</li>' -// using the `sourceURL` option to specify a custom sourceURL for the template +// 使用 `sourceURL` 选项指定模板的来源URL var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' }); compiled(data); -// => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector +// => 在开发工具的 Sources 选项卡 或 Resources 面板中找到 "greeting.jst" -// using the `variable` option to ensure a with-statement isn't used in the compiled template +// 使用 `variable` 选项确保在编译模板中不声明变量 var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' }); compiled.source; // => function(data) { @@ -14417,8 +14415,8 @@
示例
// return __p; // } -// using the `source` property to inline compiled templates for meaningful -// line numbers in error messages and a stack trace +// 使用 `source` 特性内联编译模板 +// 便以查看行号、错误信息、堆栈 fs.writeFileSync(path.join(cwd, 'jst.js'), '\ var JST = {\ "main": ' + _.template(mainText).source + '\ @@ -14453,10 +14451,10 @@示例
})();toLower source npm
+toLower source npm
_.toLower([string=''])-Converts
+string
, as a whole, to lower case.转换整体的字符串为小写
参数
@@ -14465,7 +14463,7 @@参数
返回值 (string)
-Returns the lower cased string.
+返回小写的字符串
示例
-_.toLower('--Foo-Bar'); @@ -14505,10 +14503,10 @@
示例
})();toUpper source npm
+toUpper source npm
_.toUpper([string=''])-Converts
+string
, as a whole, to upper case.转换整体的字符串为大写
参数
@@ -14517,7 +14515,7 @@参数
返回值 (string)
-Returns the upper cased string.
+返回大写的字符串
示例
-_.toUpper('--foo-bar'); @@ -14557,21 +14555,21 @@
示例
})();trim source npm
+trim source npm
_.trim([string=''], [chars=whitespace])-Removes leading and trailing whitespace or specified characters from
+string
.从字符串中移除前面和后面的空白 或 指定的字符。
参数
-
-
- [string=''] (string)
The string to trim.
+- [string=''] (string)
-要处理的字符串
- [chars=whitespace] (string)
The characters to trim.
+- [chars=whitespace] (string)
要处理的字符
返回值 (string)
-Returns the trimmed string.
+返回处理后的字符串
示例
-_.trim(' abc '); @@ -14611,21 +14609,21 @@
示例
})();trimEnd source npm
+trimEnd source npm
_.trimEnd([string=''], [chars=whitespace])-Removes trailing whitespace or specified characters from
+string
.移除字符串后面的空白 或 指定的字符。
参数
-
-
- [string=''] (string)
The string to trim.
+- [string=''] (string)
-要处理的字符串
- [chars=whitespace] (string)
The characters to trim.
+- [chars=whitespace] (string)
要处理的字符
返回值 (string)
-Returns the trimmed string.
+返回处理后的字符串
示例
-_.trimEnd(' abc '); @@ -14662,21 +14660,21 @@
示例
})();trimStart source npm
+trimStart source npm
_.trimStart([string=''], [chars=whitespace])-Removes leading whitespace or specified characters from
+string
.移除字符串中前面的空白 或 指定的字符。
参数
-
-
- [string=''] (string)
The string to trim.
+- [string=''] (string)
-要处理的字符串
- [chars=whitespace] (string)
The characters to trim.
+- [chars=whitespace] (string)
要处理的字符
返回值 (string)
-Returns the trimmed string.
+返回处理后的字符串
示例
-_.trimStart(' abc '); @@ -14713,29 +14711,28 @@
示例
})();truncate source npm
+truncate source npm
_.truncate([string=''], [options])-Truncates
+string
if it's longer than the given maximum string length. -The last characters of the truncated string are replaced with the omission -string which defaults to "...".截断字符串,如果字符串超出了限定的最大值。 +被截断的字符串后面会以
omission
代替,omission
默认是 "..."。参数
-
-
- [string=''] (string)
The string to truncate.
+- [string=''] (string)
-要截断的字符串
- [options] (Object)
The options object.
+- [options] (Object)
-选项对象
- [options.length=30] (number)
The maximum string length.
+- [options.length=30] (number)
-允许的最大长度
- [options.omission='...'] (string)
The string to indicate text is omitted.
+- [options.omission='...'] (string)
-超出后的代替字符
- [options.separator] (RegExp|string)
The separator pattern to truncate to.
+- [options.separator] (RegExp|string)
截断点
返回值 (string)
-Returns the truncated string.
+返回截断后的字符串
示例
-_.truncate('hi-diddly-ho there, neighborino'); @@ -14786,25 +14783,24 @@
示例
})();unescape source npm
+unescape source npm
_.unescape([string=''])-The inverse of
_.escape
; this method converts the HTML entities -&
,<
,>
,"
,'
, and`
instring
to their -corresponding characters. +反向版
+注意: 不会转换其他的 HTML 实体,需要转换可以使用类似 he 的第三方库。_.escape
。 +这个方法转换 HTML 实体 +&
,<
,>
,"
,'
, 以及`
为对应的字符。
-注意: No other HTML entities are unescaped. To unescape additional HTML -entities use a third-party library like he.参数
-
-
- [string=''] (string)
The string to unescape.
+- [string=''] (string)
要转换的字符串
返回值 (string)
-Returns the unescaped string.
+返回转换后的字符串
示例
-_.unescape('fred, barney, & pebbles'); @@ -14838,10 +14834,10 @@
示例
})();upperCase source npm
+upperCase source npm
_.upperCase([string=''])-Converts
+string
, as space separated words, to upper case.转换字符串为空格分割的大写单词
参数
@@ -14850,7 +14846,7 @@参数
返回值 (string)
-Returns the upper cased string.
+返回大写单词
示例
-_.upperCase('--foo-bar'); @@ -14939,21 +14935,21 @@
示例
})();words source npm
+words source npm
_.words([string=''], [pattern])-Splits
+string
into an array of its words.拆分字符串中的词为数组
参数
-
-
- [string=''] (string)
The string to inspect.
+- [string=''] (string)
-要处理的字符串
- [pattern] (RegExp|string)
The pattern to match words.
+- [pattern] (RegExp|string)
匹配模式
返回值 (Array)
-Returns the words of
+string
.然后拆分后的数组
示例
-_.words('fred, barney, & pebbles'); @@ -14990,7 +14986,7 @@
示例
})();attempt source npm
+attempt source npm
_.attempt(func)-Attempts to invoke
func
, returning either the result or the caught error @@ -15043,7 +15039,7 @@示例
})();bindAll source npm
+bindAll source npm
_.bindAll(object, methodNames)-Binds methods of an object to the object itself, overwriting the existing @@ -15103,7 +15099,7 @@
示例
})();cond source npm
+cond source npm
_.cond(pairs)-Creates a function that iterates over
pairs
invoking the corresponding @@ -15164,7 +15160,7 @@示例
})();conforms source npm
+conforms source npm
_.conforms(source)-Creates a function that invokes the predicate properties of
source
with @@ -15217,7 +15213,7 @@示例
})();constant source npm
+constant source npm
_.constant(value)-Creates a function that returns
@@ -15266,7 +15262,7 @@value
.示例
})();flow source npm
+flow source npm
_.flow([funcs])-Creates a function that returns the result of invoking the provided @@ -15319,7 +15315,7 @@
示例
})();flowRight source npm
+flowRight source npm
_.flowRight([funcs])-这个方法类似
_.flow
except that it creates a function that @@ -15371,7 +15367,7 @@示例
})();identity source npm
+identity source npm
_.identity(value)-This method returns the first argument provided to it.
@@ -15419,7 +15415,7 @@示例
})();iteratee source npm
+iteratee source npm
_.iteratee([func=_.identity])-创建一个调用
func
的函数。 with the arguments of the created @@ -15486,7 +15482,7 @@示例
})();matches source npm
+matches source npm
_.matches(source)-Creates a function that performs a deep partial comparison between a given @@ -15542,7 +15538,7 @@
示例
})();matchesProperty source npm
+matchesProperty source npm
_.matchesProperty(path, srcValue)-Creates a function that performs a deep partial comparison between the @@ -15600,7 +15596,7 @@
示例
})();method source npm
+method source npm
_.method(path, [args])-Creates a function that invokes the method at
path
of a given object. @@ -15657,7 +15653,7 @@示例
})();methodOf source npm
+methodOf source npm
_.methodOf(object, [args])-The opposite of
_.method
; this method creates a function that invokes @@ -15713,7 +15709,7 @@示例
})();mixin source npm
+mixin source npm
_.mixin([object=lodash], source, [options])-Adds all own enumerable function properties of a source object to the @@ -15785,7 +15781,7 @@
示例
})();noConflict source npm
+noConflict source npm
_.noConflict()-Reverts the
_
variable to its previous value and returns a reference to @@ -15826,7 +15822,7 @@示例
})();noop source npm
+noop source npm
_.noop()-A no-operation function that returns
undefined
regardless of the @@ -15867,7 +15863,7 @@示例
})();nthArg source npm
+nthArg source npm
_.nthArg([n=0])-Creates a function that returns its nth argument.
@@ -15915,7 +15911,7 @@示例
})();over source npm
+over source npm
_.over(iteratees)-Creates a function that invokes
iteratees
with the arguments provided @@ -15964,7 +15960,7 @@示例
})();overEvery source npm
+overEvery source npm
_.overEvery(predicates)-Creates a function that checks if all of the
predicates
return @@ -16019,7 +16015,7 @@示例
})();overSome source npm
+overSome source npm
_.overSome(predicates)-Creates a function that checks if any of the
predicates
return @@ -16074,7 +16070,7 @@示例
})();property source npm
+property source npm
_.property(path)-Creates a function that returns the value at
@@ -16128,7 +16124,7 @@path
of a given object.示例
})();propertyOf source npm
+propertyOf source npm
_.propertyOf(object)-The opposite of
_.property
; this method creates a function that returns @@ -16181,7 +16177,7 @@示例
})();range source npm
+range source npm
_.range([start=0], end, [step=1])-Creates an array of numbers (positive and/or negative) progressing from @@ -16257,7 +16253,7 @@
示例
})();rangeRight source npm
+rangeRight source npm
_.rangeRight([start=0], end, [step=1])这个方法类似
_.range
except that it populates values in @@ -16329,7 +16325,7 @@示例
runInContext source npm
_.runInContext([context=root])--Create a new pristine
+lodash
function using thecontext
object.Create a new pristine
lodash
function 使用context
object.参数
@@ -16394,7 +16390,7 @@示例
})();times source npm
+times source npm
_.times(n, [iteratee=_.identity])-Invokes the iteratee function
n
times, returning an array of the results @@ -16446,7 +16442,7 @@示例
})();toPath source npm
+toPath source npm
_.toPath(value)-Converts
@@ -16504,7 +16500,7 @@value
to a property path array.示例
})();uniqueId source npm
+uniqueId source npm
_.uniqueId([prefix])Generates a unique ID. If
diff --git a/ary.html b/ary.html index f8b7a9f..048b006 100644 --- a/ary.html +++ b/ary.html @@ -337,9 +337,9 @@prefix
is provided the ID is appended to it.- padStart
- parseInt
- repeat
-- replace
+- replace
- snakeCase
-- split
+- split
- startCase
- startsWith
- template
diff --git a/assign.html b/assign.html index 7d31cf2..d0091d0 100644 --- a/assign.html +++ b/assign.html @@ -337,9 +337,9 @@- padStart
- parseInt
- repeat
-- replace
+- replace
- snakeCase
-- split
+- split
- startCase
- startsWith
- template
diff --git a/assignIn.html b/assignIn.html index 9d1132b..bf6e6a2 100644 --- a/assignIn.html +++ b/assignIn.html @@ -337,9 +337,9 @@- padStart
- parseInt
- repeat
-- replace
+- replace
- snakeCase
-- split
+- split
- startCase
- startsWith
- template
diff --git a/assignInWith.html b/assignInWith.html index 1b3a08b..f6ef88f 100644 --- a/assignInWith.html +++ b/assignInWith.html @@ -337,9 +337,9 @@- padStart
- parseInt
- repeat
-- replace
+- replace
- snakeCase
-- split
+- split
- startCase
- startsWith
- template
diff --git a/assignWith.html b/assignWith.html index 5663c2f..002f427 100644 --- a/assignWith.html +++ b/assignWith.html @@ -337,9 +337,9 @@- padStart
- parseInt
- repeat
-- replace
+- replace
- snakeCase
-- split
+- split
- startCase
- startsWith
- template
diff --git a/at.html b/at.html index 1c71df8..08fbb14 100644 --- a/at.html +++ b/at.html @@ -337,9 +337,9 @@- padStart
- parseInt
- repeat
-- replace
+- replace
- snakeCase
-- split
+- split
- startCase
- startsWith
- template
diff --git a/attempt.html b/attempt.html index 98cd4f0..cf98ada 100644 --- a/attempt.html +++ b/attempt.html @@ -337,9 +337,9 @@- padStart
- parseInt
- repeat
-- replace
+- replace
- snakeCase
-- split
+- split
- startCase
- startsWith
- template
@@ -392,7 +392,7 @@ - [string=''] (string)
- [string=''] (string)
- [string=''] (string)
- [string=''] (string)
- [string=''] (string)
- [string=''] (string)
- [string=''] (string)
- [target] (string)
- [string=''] (string)
- [string=''] (string)
- [string=''] (string)
- [radix] (number)