underscore.js 一個強大的js函數庫

Underscore提供的100多個函數,主要涉及對Collection、Object、Array、Function的操做:css

Collections(集合) 
eachmapreducereduceRightfindfilterrejectallanyincludeinvoke,pluckmaxminsortBygroupBysortedIndexshuffletoArraysizegit

Arrays(數組) 
firstinitiallastrestcompactflattenwithoutunionintersection,differenceuniqzipindexOflastIndexOfrangegithub

Functions(函數) 
bindbindAllmemoizedelaydeferthrottledebounceonceafterwrap,compose數組

Objects(對象) 
keysvaluesfunctionsextenddefaultsclonetapisEqualisEmpty,isElementisArrayisArgumentsisFunctionisStringisNumberisBoolean,isDateisRegExpisNaNisNullisUndefinedide

Utility(功能) 
noConflictidentitytimesmixinuniqueIdescapetemplate函數

Chaining 
chainvaluespa

 

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

相關文章
相關標籤/搜索