Underscore.js


Underscore.js is a JavaScript library which provides utility functions for common programming tasks. It is comparable to features provided by Prototype.js and the Ruby language, but opts for a functional programming design instead of extending object prototypes. For example, Underscore.js' _.each function delegates to the host environment's native forEach implementation when present, or a compatible version when absent. The documentation refers to Underscore.js as "the tie to go along with jQuery's tux, and Backbone.js' suspenders." Underscore.js was created by Jeremy Ashkenas, who is also known for Backbone.js and CoffeeScript.

History

First developed in 2009, Underscore has recently been overtaken by Lodash. Development has since slowed on Underscore.js, and the core developers of underscore have devoted their energy to Lodash instead.

Content

Underscore consists of a little more than 100 functions, which fall under four main categories depending on the datatypes which they manipulate: functions for manipulating arrays, functions for manipulating objects, functions for manipulating both arrays and objects and functions for manipulating other functions. There are also two utility categories: "Utility" and "Chaining".