前端开发人员大都喜欢 Underscore,它的工具函数很实用,用法简单。这里给大家推荐另外一个功能更全面的 JavaScript 工具——Lo-Dash,帮助你更好的开发网站和 Web 应用程序。
您可能感兴趣的相关文章
Lo-Dash 特色功能:
- AMD loader support (curl, dojo, requirejs, etc.)
_(…)supports intuitive chaining_.atfor cherry-picking values_.bindKeyfor binding “lazy” defined methods_.clonesupports shallow cloning ofDate&RegExpobjects_.cloneDeepfor deep cloning arrays & objects_.containsaccepts afromIndex_.createCallbackfor extending callbacks in methods & mixins_.curryfor creating curried functions_.debounce&_.throttleaccept additionaloptionsfor more control_.findIndex&_.findKeyfor finding indexes & keys_.forEachis chainable & supports exiting early_.forInfor iterating own & inherited properties_.forOwnfor iterating own properties_.isPlainObjectfor checking if values are created byObject_.memoizeexposes thecacheof memoized functions_.mergefor a deep_.extend_.parseIntfor consistent behavior_.partialRightfor partial application from the right_.pull&_.removefor mutating arrays_.randomsupports returning floating-point numbers_.runInContextfor easier mocking_.supportfor flagging environment features_.templatesupports “imports” options & ES6 template delimiters_.transformas a powerful alternative to_.reducefor transforming objects_.wheresupports deep comparisons_.zipis 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
您可能感兴趣的相关文章
