collect.js

collect.js

collect.js是JavaScript處理數組和對象的方便且無依賴性的包裝類工具。提供了常用的數組和集合的操作API,map,reduce,filter等集合的高級方法。

Collect.js 提供一個和基於php的Laravel(幾乎)一樣的api.

基本介紹

  • 外文名:Collect.js
範圍,安裝,提示,區別,

範圍

處理數組和對象的方便且無依賴性的包裝類工具

安裝

npm install collect.js --save

提示

使用Laravel作為你的後台? Collect.js 提供一個和Laravel(幾乎)一樣的apiLaravel Collections5.5.查看區別.

區別

3.1all()
  • 3.2average()

3.3avg()
3.4chunk()
3.5collapse()
3.6combine()
3.7concat()
3.8contains()
3.9count()
3.10crossJoin()
3.11dd()
3.12diff()
3.13diffAssoc()
3.14diffKeys()
3.15dump()
3.16each()
3.17eachSpread()
3.18every()
3.19except()
3.20filter()
3.21first()
3.22firstWhere()
3.23flatMap()
3.24flatten()
3.25flip()
3.26forget()
3.27forPage()
3.28get()
3.29groupBy()
3.30has()
3.31implode()
3.32intersect()
3.33intersectByKeys()
3.34isEmpty()
3.35isNotEmpty()
3.36keyBy()
3.37keys()
3.38last()
3.39macro()
3.40map()
3.41mapInto()
3.42mapSpread()
3.43mapToDictionary()
3.44mapToGroups()
3.45mapWithKeys()
3.46max()
3.47median()
3.48merge()
3.49min()
3.50mode()
3.51nth()
3.52only()
3.53pad()
3.54partition()
3.55pipe()
3.56pluck()
3.57pop()
3.58prepend()
3.59pull()
3.60push()
3.61put()
3.62random()
3.63reduce()
3.64reject()
3.65reverse()
3.66search()
3.67shift()
3.68shuffle()
3.69slice()
3.70sort()
3.71sortBy()
3.72sortByDesc()
3.73splice()
3.74split()
3.75sum()
3.76take()
3.77tap()
3.78times()
3.79toArray()
3.80toJson()
3.81transform()
3.82union()
3.83unique()
3.84unless()
3.85unwrap()
3.86values()
3.89when()
3.90where()
3.91whereIn()
3.92whereNotIn()
3.93wrap()
3.94zip()

相關詞條

熱門詞條

聯絡我們