
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
- Stars
- 19.1k
- Forks
- 814
- Licence
- MIT
- Language
- JavaScript
- Last update
- 20 days ago
- Type
- Learning resource
What it is
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.
- Look up a native replacement for _.chunk, _.compact or _.uniq before adding a dependency
- Run the ESLint plugin on a codebase to find places where Lodash or Underscore may not be needed
- Learn how native array and object methods work by comparing them to library calls
Great for
- 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
Not ideal for
- 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
How to get it
- 1
Install with a package manager
You'll need: Node.js and npm (for the ESLint plugin) · ESLint (for the ESLint plugin)
Install the ESLint plugin as a dev dependency
npm install --save-dev eslint-plugin-you-dont-need-lodash-underscore - 2
Run it
- Open the guide in your browser at the project's GitHub Pages site or read the README.
- Find the Lodash or Underscore method you use in the Quick Links list.
- Compare the library example with the native example and check browser support.
- Optionally install the ESLint plugin and extend plugin:you-dont-need-lodash-underscore/compatible in your config.
- 3
Get the most out of it
- Check the browser support table before replacing a library call with a native one.
- Read the null-safety note in the README before swapping _.keys or similar calls.
- Use the ESLint plugin on a codebase to get a list of candidate replacements.
- Use es5-shim if you need to support legacy engines, as the README suggests.
Downloads
Strengths
- 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
Trade-offs
- 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
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| You-Dont-Need-Lodash-Underscore (this) | 19.1k | Learning resource | beginner | 20 days ago | Front-end developers who target modern browsers and want fewer dependencies |
| underscore | 27.3k | Library | beginner | 22 days ago | JavaScript developers who want common collection helpers without writing them by hand |
| ramda | 24.1k | Library | intermediate | 26 days ago | JavaScript developers who want to write functional-style data transformations |
| imgui | 76.9k | Library | intermediate | 7 days ago | Game developers who want an in-engine debug or tools panel |
| lowdb | 22.6k | Library | beginner | 7 months ago | Node.js developers building small tools or prototypes that need simple persistent storage |
| lo | 21.4k | Library | beginner | 6 days ago | Go developers who often transform slices or maps |
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.