githubEdit

LOADASH Cheat Sheet

Lodash cheatsheet

Excerpt

This is not a complete list. · One-page guide to Lodash


#Collections

Finding

_.filter(list, (n) => n % 2)    
_.find(list, (n) => n % 2)      
_.findLast(list, ...)           

Works for both arrays and objects.

Accessing

_.at([ abcd ], 0)               
_.at([ abcd ], [ 0, 1 ])        

Set/get

_.set(object, 'users[0].name', value)
_.get(object, 'users[0].name')
_.get(object, ['users', 0, 'name'])

Iteration

#Array

Arrays

Filtering

Accessing

Sets

Indexes

#Functions

Currying

#Decorating functions

Throttling

Limiting

Etc

#Strings

Capitalization

Padding

Trim

Etc

#Objects

Keys and values

#Chaining

Chain and value

Last updated