Underscore.js

Underscore.js
Underscore.png
Developer(s) Jeremy Ashkenas
Stable release 1.8.3 / April 2, 2015; 12 months ago (2015-04-02)
Development status Active
Written in JavaScript
Size 5 KB production
44 KB development
Type JavaScript library
License MIT
Website underscorejs.org

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's _.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's suspenders." Underscore.js was created by Jeremy Ashkenas, who is also known for Backbone.js and CoffeeScript.[1]

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 (the name of the category is "Collections") and functions for manipulating other functions. There are also two utility categories : "Utility" and "Chaining".

See also

References

  1. ^ "JavaScript Meetup City", Open (The New York Times), April 4, 2012  The documentation actually begins with the words "Underscore is a JavaScript library that provides a whole mess"...that says it all. Any language that uses _ as a static variable name is trash.

External links