Jump to content

Underscore.js

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Nobody particular (talk | contribs) at 12:13, 6 June 2014 (→‎Content). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Developer(s)Jeremy Ashkenas
Stable release
1.6.0 / February 10, 2014; 10 years ago (2014-02-10)
Repository
Written inJavaScript
Size5 KB production
44 KB development
TypeJavaScript library
LicenseMIT
Websiteunderscorejs.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]

Currently the Underscore.js library is the most dependent upon [2] package in the Node.js JavaScript runtime.

Content

Underscore consists of a little more than 60 functions, which are 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".

References

  1. ^ "JavaScript Meetup City", Open, The New York Times, April 4, 2012
  2. ^ "Node Packaged Modules".

See also