33 lines
465 B
Markdown
33 lines
465 B
Markdown
---
|
|
title: Lodash
|
|
category: JavaScript libraries
|
|
---
|
|
|
|
> This is an incomplete list.
|
|
|
|
### Array
|
|
|
|
```js
|
|
_.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)
|
|
```
|