Skip to content

Underscore

A JavaScript utility library of helper functions like map, filter and reduce.

Stars
27.3k
Forks
5.4k
Licence
MIT
Language
JavaScript
Last update
21 days ago
Type
Library

What it is

Underscore.js is a utility library for JavaScript that offers common functional helpers such as each, map, reduce and filter. According to the README, it does this without extending any built-in JavaScript objects. Developers use it to write shorter, more readable code when working with arrays, objects and collections.

  • Transform an array with map or filter using a short, consistent syntax
  • Reduce a collection to a single value with reduce
  • Iterate over the items in a list or object with each

Great for

  • JavaScript developers who want common collection helpers without writing them by hand
  • Maintainers of older codebases that need utility functions without changing built-in objects
  • Developers who prefer a functional style for transforming data

Not ideal for

  • Projects that need only modern built-in array methods, since the README does not compare Underscore to them and many of them now cover the same ground
  • Readers looking for a full application framework, because the README describes only a utility library
Step-by-step guide: how to use UnderscoreInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Node.js or a browser environment

    Clone the repository

    git clone https://github.com/jashkenas/underscore.git
  2. 2

    Run it

    • Read the documentation at https://underscorejs.org
    • Add Underscore to your project using the download or package links on the documentation site
    • Call the _ helper functions, such as _.map or _.filter, on your data
  3. 3

    Get the most out of it

    • Check the documentation site for the full list of helper functions
    • Review the project's tests, which the README links to from the documentation site
    • Use the Tidelift Subscription if your organization needs enterprise support

Downloads

Strengths

  • Has a long track record, with about 27,000 stars on GitHub
  • Released under the permissive MIT license
  • Does not modify core JavaScript objects, so it is less likely to conflict with other code

Trade-offs

  • The README is short and points to the project website for full documentation and downloads
  • The README does not state a current release or version number
  • Support is handled through community channels such as Gitter and Stack Overflow rather than a formal support plan

How it compares

ProjectStarsTypeLevelUpdatedBest for
underscore (this)27.3kLibrarybeginner21 days agoJavaScript developers who want common collection helpers without writing them by hand
ramda24.1kLibraryintermediate25 days agoJavaScript developers who want to write functional-style data transformations

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.