Underscore vs You Don't Need Lodash/Underscore
Which should you use? A side-by-side look at what each one does, who it suits, what it costs, how hard it is to set up, and where each falls short.
Open source · MIT
A JavaScript utility library of helper functions like map, filter and reduce.
Open source · MIT
A list of JavaScript utility functions you can often replace with built-in language features, plus an ESLint p
The short answer
Choose Underscore if you need…
- 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
Choose You Don't Need Lodash/Underscore if you need…
- Front-end developers who target modern browsers and want fewer dependencies
- Teams trying to reduce bundle size by dropping small utility libraries
- Developers learning which ES5 and ES2015 methods already exist natively
- Projects that want an ESLint rule to point out unnecessary utility library calls
Side-by-side
| Underscore | You Don't Need Lodash/Underscore | |
|---|---|---|
| Type | Library | Learning resource |
| Price | Free and open source | Free and open source |
| Licence | MIT | MIT |
| GitHub stars | 27.3k | 19.1k |
| Setup difficulty | Beginner | Beginner |
| How you get it | Install with a package manager | Install with a package manager |
| Main language | JavaScript | JavaScript |
| Last code update | 21 days ago | 20 days ago |
What each one is
Underscore
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.
You Don't Need Lodash/Underscore
This is a reference guide that shows how common Lodash and Underscore helper functions can be written with plain JavaScript built into the language, such as Array and Object methods. Each entry places the library version beside a native version so you can compare them. It also includes an ESLint plugin that flags code where a native alternative may work instead.
Best for
Underscore
- 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
You Don't Need Lodash/Underscore
- Front-end developers who target modern browsers and want fewer dependencies
- Teams trying to reduce bundle size by dropping small utility libraries
- Developers learning which ES5 and ES2015 methods already exist natively
- Projects that want an ESLint rule to point out unnecessary utility library calls
Strengths
Underscore
- 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
You Don't Need Lodash/Underscore
- Clear side-by-side examples of library calls and native equivalents
- Includes browser support tables for each native method shown
- Optional ESLint plugin helps find candidates in existing code
Not ideal for
Underscore
- 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
You Don't Need Lodash/Underscore
- Projects that must support old engines without es5-shim or polyfills, since many native methods are missing there
- Code that depends on Lodash null-safety or extra options, because the README notes native equivalents are not always null safe or as flexible
- Anyone expecting a full drop-in replacement, since the README says the list is not a 1:1 comparison
Trade-offs
Underscore
- 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
You Don't Need Lodash/Underscore
- The README says it is not a 1:1 comparison, so some library behaviour is not matched
- Native versions may not handle null or edge cases the way the library does
- Browser support tables reflect older browser versions and the README is truncated in places
Getting started
Underscore
Clone the repository
git clone https://github.com/jashkenas/underscore.gitYou Don't Need Lodash/Underscore
Install the ESLint plugin as a dev dependency
npm install --save-dev eslint-plugin-you-dont-need-lodash-underscoreFrequently asked questions
What is the difference between Underscore and You Don't Need Lodash/Underscore?
Underscore: A JavaScript utility library of helper functions like map, filter and reduce. You Don't Need Lodash/Underscore: A list of JavaScript utility functions you can often replace with built-in language features, plus an ESLint p. Underscore suits javascript developers who want common collection helpers without writing them by hand, while You Don't Need Lodash/Underscore suits front-end developers who target modern browsers and want fewer dependencies.
Are Underscore and You Don't Need Lodash/Underscore free?
Underscore: Free and open source. You Don't Need Lodash/Underscore: Free and open source.
Is Underscore or You Don't Need Lodash/Underscore more popular?
Underscore has more GitHub stars (27.3k) than You Don't Need Lodash/Underscore (19.1k). Popularity isn't the same as fit — check which one matches your use case above.
What are other alternatives to Underscore and You Don't Need Lodash/Underscore?
Other options people compare them with include Ramda.
Keep comparing
Built from our catalogue entries for both products: open-source details come from each project's README (AI-assisted, refreshed weekly) and GitHub data; AI-tool details are editorial. Spotted something wrong? Let us know from either product's page.