1
0
mirror of https://github.com/onkelbeh/cheatsheets.git synced 2025-10-16 23:47:47 +02:00
cheatsheets/lodash.md
2015-11-24 16:06:06 +11:00

465 B

title, category
title category
Lodash JavaScript libraries

This is an incomplete list.

Array

_.chunk([ abcd ], 2)           //=> [ [ab], [cd] ]
_.compact(list)

_.difference([ abc ], [ bc ])  //=> [ a ]
_.intersection()

_.drop([ abcde ], 1)           //=> [ bcde ] (right)
_.dropWhile

_.dropRight
_.dropRightWhile

_.fill(Array(4), 'x')          //=> [ 'x', 'x', 'x', 'x' ]

_.findIndex
_.findLastIndex

_.flatten
_.flattenDeep

_.indexOf(list, val)