- Underscore.JS Tutorial
- Underscore.JS - Home
- Underscore.JS - Overview
- Underscore.JS - Environment Setup
- Underscore.JS - Iterating Collection
- Underscore.JS - Processing Collection
- Underscore.JS - Iterating Array
- Underscore.JS - Processing Array
- Underscore.JS - Functions
- Underscore.JS - Mapping Objects
- Underscore.JS - Updating Objects
- Underscore.JS - Comparing Objects
- Underscore.JS - Utilities
- Underscore.JS - Chaining
- Underscore.JS Useful Resources
- Underscore.JS - Quick Guide
- Underscore.JS - Useful Resources
- Underscore.JS - Discussion
Underscore.JS - Overview
Underscore.JS is a popular javascript based library which provides 100+ functions to facilitate web development. It provides helper functions like map, filter, invoke as well as function binding, javascript templating, deep equality checks, creating indexes and so on. Underscore.JS can be used directly inside a browser and also with Node.js.
Working with objects using JavaScript can be quite challenging, specifically if you have lots of manipulation to be done with them. Underscore comes with lots of features that eases your work with objects.
Underscore.JS is an open source project and you can easily contribute to the library and add features in the form of plugins and make it available on GitHub and in Node.js.
Features
Let us understand in detail all the important features available with Underscore −
Collections
Underscore.JS provides various functions for collections like each, map, reduce which are used to apply an operation on each item of a collection. It provides method like groupBy, countBy, max, min which processes collections and ease lot of tasks.
Arrays
Underscore.JS provides various functions for arrays like to iterate and process arrays like first, initial, lastIndexOf, intersection, difference etc.
Functions
Underscore.JS provides functions such as bind, delay, before, after etc.
Objects
Underscore.JS provides functions to manipulate objects, to map objects and comparing objects. For example, keys, values, extends, extendsOwn, isEqual, isEmpty etc.
Utilities
Underscore.JS provides various utilities methods like noConflict, random, iteratee, escape etc.
Chaining
Underscore.JS provides chaining methods as well like chain, value.
In subsequent chapters, we'll cover importants functions of Underscore.JS