Underscore.js — Javascript library

Diana ponce
2 min readDec 5, 2020

I am currently an intern at a Company as a software developer. This company uses React, React-redux, typescript, and mongoDB for their applications. While going through their components I notice that they seemed to be using underscore everywhere in their application. I didn't pay much attention to it, didn't think it was really important until I was given a task to work on, which was fixing a bug they had on the site. I was able to fix the bug but by using plain javascript, when I went to present my work the software engineer at the company explained that I should be using underscore since their whole application is based on underscore. She wanted me to look more into it and understand the importance of it and how it helps us !

Underscore is a lightweight JS library that provides numerous small functions. It is filled multiple different and useful function. These functions aso include map, reduce, and filter that already exist in vanilla javascript. They provide us a ton of different functions that aren't a part of vanilla javascript but that are part of other programming languages .

The Underscore.js functions gives us Functions that:

- manipulate arrays

- manipulate objects

- manipulate Collections(arrays and objects)

-manipulate other functions.

This library allows us to make our code simpler to write and easier to read. It gives us many ways to sort, combine, exclude, and transform objects and arrays. It can help us condense unmanageable data sets by either including or excluding their values.

This is a highly recommended library to use to make writing code easier for us, I highly recommend looking at their documentation, It is very detailed and very helpful!

--

--