Lo-Dash – 替代 Underscore 的优秀 JS 工具库
前端开发人员大都喜欢 Underscore,它的工具函数很实用,用法简单。这里给大家推荐另外一个功能更全面的 JavaScript 工具——Lo-Dash,帮助你更好的开发网站和 Web 应用程序。
您可能感兴趣的相关文章
Lo-Dash 特色功能:
- AMD loader support (curl, dojo, requirejs, etc.)
_(…)
supports intuitive chaining_.at
for cherry-picking values_.bindKey
for binding “lazy” defined methods_.clone
supports shallow cloning ofDate
&RegExp
objects_.cloneDeep
for deep cloning arrays & objects_.contains
accepts afromIndex
_.createCallback
for extending callbacks in methods & mixins_.curry
for creating curried functions_.debounce
&_.throttle
accept additionaloptions
for more control_.findIndex
&_.findKey
for finding indexes & keys_.forEach
is chainable & supports exiting early_.forIn
for iterating own & inherited properties_.forOwn
for iterating own properties_.isPlainObject
for checking if values are created byObject
_.memoize
exposes thecache
of memoized functions_.merge
for a deep_.extend
_.parseInt
for consistent behavior_.partialRight
for partial application from the right_.pull
&_.remove
for mutating arrays_.random
supports returning floating-point numbers_.runInContext
for easier mocking_.support
for flagging environment features_.template
supports “imports” options & ES6 template delimiters_.transform
as a powerful alternative to_.reduce
for transforming objects_.where
supports deep comparisons_.zip
is capable of unzipping values_.omit
,_.pick
, & more accept callbacks_.contains
,_.toArray
, & more accept strings_.filter
,_.map
, & more support “_.pluck” & “_.where” shorthands_.findLast
,_.findLastIndex
, & more right-associative methods
您可能感兴趣的相关文章
作者:山边小溪
主站:yyyweb.com 记住啦:)
欢迎任何形式的转载,但请务必注明出处。