Library / SDK
jashkenas/underscore avatar
jashkenas/underscore

Underscore.js adds collection helpers without touching prototypes

JavaScript's utility _ belt

27,294 stars5,410 forksJavaScriptMIT

At a glance

What is it?
Underscore.js is a JavaScript utility-belt library that provides each, map, reduce, and filter without extending core JavaScript objects; this covers its DocumentCloud roots, docs and support channels.
Who is it for?
The README stays close to fundamentals: a utility-belt library that ships each, map, reduce, and filter without extending core JavaScript objects, documented and distributed through underscorejs.org, with support split across a security policy, Gitter, and StackOverflow. Its history as an open-sourced DocumentCloud component, its Patreon and Tidelift funding, and its code of conduct fill in the rest of the picture.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 30 days ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • jashkenas/underscore27,294 ★ · -25
Star history
Repository2026-09-282026-11-14
jashkenas/underscore27.3k27.3k

-25 Stars in the last 47 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The one-sentence definition in the README

The README opens with a single definition: a utility-belt library for JavaScript that provides support for the usual functional suspects, each, map, reduce, and filter, without extending any core JavaScript objects. Every part of that sentence carries weight. The four named methods cover iteration, transformation, aggregation, and selection, which is the bulk of everyday collection work in the language.

The closing clause is the design decision the whole library hangs on. Its methods attach to one exported object rather than patching Array, Object, or Function prototypes, so code using the library never changes how built-in types behave for anyone else. In a codebase where several libraries load side by side, that property is what made it safe to adopt.

Docs, downloads, and support channels

The README routes everything practical to underscorejs.org, naming that site as the place for documentation, license information, tests, and pre-packed downloads. A reader who wants the method reference, the legal terms, the test suite, or a built file for direct download gets all four from the same address.

For questions and problems, the README lists three routes: the project's security policy for vulnerability reports, a Gitter channel for live chat, and StackOverflow, linked as a search for the library's name. The split has a clear shape: a security policy for security matters, a realtime room for quick back-and-forth, and a public archive for anything worth keeping searchable.

Where the library started

One line of the README anchors the project's history: the library is an open-sourced component of DocumentCloud, with a link to the DocumentCloud GitHub organization.

Funding and community rules

The README covers money and conduct in a few lines. Individual supporters are pointed to Patreon, and enterprise coverage is available as part of the Tidelift Subscription for its npm package.

The same page notes that the project adheres to a code of conduct, and that by participating in the project you are expected to uphold this code. Contributors as a group are thanked through the project's contributors page. None of this is unusual for an open source project today, but listing it on so short a front page shows what the maintainer considered necessary for anyone landing on the repository: where to get the code, where to ask for help, how to report a vulnerability, how the project is funded, and the behavioral baseline for joining in.

Why the no-extension rule mattered

The choice to leave core objects alone deserves a closer look, because it set the library apart from contemporaries that did modify prototypes. Prototype extension changes behavior for every script on the page, including third-party code, so two libraries that both patch Array.prototype can conflict in ways that are hard to trace. A namespace approach has none of that risk: the helpers exist only where the library object is in scope.

The trade-off is a small amount of extra typing at each call site, wrapping data in the library object or calling methods with the data as an argument. JavaScript later absorbed many of the same ideas natively, with map, reduce, and filter arriving as built-in array methods.

What this front page does not contain

The README is a routing document, not a reference. It names the library, gives the definition, links the documentation site, lists the support channels, credits DocumentCloud, and describes funding and conduct. It does not list the API, show usage examples, discuss performance, or state version numbers and compatibility ranges. Anyone evaluating the project against a specific codebase needs the underscorejs.org reference that the README points to.

Editorial conclusion

The README stays close to fundamentals: a utility-belt library that ships each, map, reduce, and filter without extending core JavaScript objects, documented and distributed through underscorejs.org, with support split across a security policy, Gitter, and StackOverflow. Its history as an open-sourced DocumentCloud component, its Patreon and Tidelift funding, and its code of conduct fill in the rest of the picture. The method-level detail lives at the linked site, which is exactly where the front page hands the reader off.

Frequently asked questions

What is Underscore.js used for?

It is a JavaScript library that ships collection helpers such as each, map, reduce, and filter. The README calls it a utility-belt library for the usual functional suspects, attached to a single namespace so core JavaScript objects are never modified.

Does the library modify built-in JavaScript objects?

No. The README states it works without extending any core JavaScript objects. Its methods live on one exported object rather than on Array, Object, or Function prototypes, which keeps it compatible with other code loaded on the same page.

Where can I find documentation and downloads?

The README points to underscorejs.org for documentation, license information, tests, and pre-packed downloads. Questions route to the project security policy, a Gitter channel, or StackOverflow.

Official sources

  1. Issues
  2. jashkenas/underscore on GitHub
  3. License: MIT
  4. Project website
  5. README

Was this useful?