search

Lodash

Lodash is a small modularized library which provides a bunch of helpers to work with Javascript data types (string, object, etc.) in a much more simpler way. Every single helper can be required and used itself without requiring the whole library. Additionally, it makes Javascript code look elegant and more efficient by offering functional style, method chaining and more.

Think of Lodash as an utility library to simplify Javascript development by providing functions for Javascript basic types, such as:

It also provides an API for chaining function calls in a “pipe-like” flavor:

_.chain(myArray)
 .map(x => x * 3)
 .filter(x => x % 2)
 .sum()
 .value()
  // returns the sum of myArray after multiplying all elements by 3 and rejecting the odd numbers

It may be seen as alternative of Underscore.