underscore.js 一个强大的js函数库

Underscore提供的100多个函数,主要涉及对Collection、Object、Array、Function的操作:

Collections(集合) 
eachmapreducereduceRightfindfilterrejectallanyincludeinvoke,pluckmaxminsortBygroupBysortedIndexshuffletoArraysize

Arrays(数组) 
firstinitiallastrestcompactflattenwithoutunionintersection,differenceuniqzipindexOflastIndexOfrange

Functions(函数) 
bindbindAllmemoizedelaydeferthrottledebounceonceafterwrap,compose

Objects(对象) 
keysvaluesfunctionsextenddefaultsclonetapisEqualisEmpty,isElementisArrayisArgumentsisFunctionisStringisNumberisBoolean,isDateisRegExpisNaNisNullisUndefined

Utility(功能) 
noConflictidentitytimesmixinuniqueIdescapetemplate

Chaining 
chainvalue

https://github.com/the5fire/backbonejs-learning-note

原文地址:https://www.cnblogs.com/yanyd/p/4704642.html