Repolode
jashkenas

jashkenas/underscore

A JavaScript utility library providing functional helpers like each, map, reduce and filter without extending core objects.

Open-source alternative to:Lodash

Stars
27,300
Forks
5,412
Open issues
53
Last commit
23 days ago

What is it?

Underscore.js is a utility-belt library for JavaScript. It offers a set of common functional programming helpers, such as each, map, reduce and filter, that make everyday collection and object manipulation shorter to write.

Unlike some alternatives, Underscore does not extend core JavaScript objects such as Array.prototype, so it can be used alongside other code without modifying built-in prototypes. The project is distributed through npm and documented at underscorejs.org, which also hosts the docs, tests and pre-packed downloads.

The library is MIT licensed and is an open-sourced component of DocumentCloud.

Key features

  • 01Provides collection helpers such as each, map, reduce and filter.
  • 02Does not extend or modify built-in JavaScript objects.
  • 03Offers general utilities for working with arrays, objects and functions.
  • 04Distributed through npm and usable in both browser and Node.js code.

Use cases

  • Simplifying data transformation over arrays and objects in front-end code.
  • Replacing hand-written loops and helper functions in older JavaScript projects.
  • Adding functional utilities to Node.js services without changing global prototypes.

Quick start

  1. 1

    Get the pre-packed download from underscorejs.org

Topics

FAQ

What is underscore?
A JavaScript utility library providing functional helpers like each, map, reduce and filter without extending core objects. Underscore.js is a utility-belt library for JavaScript. It offers a set of common functional programming helpers, such as each, map, reduce and filter, that make everyday collection and object manipulation shorter to write.
Is underscore free to use? What license does it have?
underscore is open source under the MIT license. Check the license terms before using it in commercial products.
Is underscore still maintained?
Actively maintained. The last commit to underscore was on Oct 15, 2026.
What can I use underscore for?
Simplifying data transformation over arrays and objects in front-end code. Replacing hand-written loops and helper functions in older JavaScript projects. Adding functional utilities to Node.js services without changing global prototypes.
How do I install underscore?
Get the pre-packed download from underscorejs.org
Where can I get underscore?
The source code and installation instructions are on GitHub: https://github.com/jashkenas/underscore

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects