About this project

You Don't Need Lodash/Underscore is a comprehensive reference documenting native JavaScript equivalents for common Lodash and Underscore utility methods. The project demonstrates that many utility functions provided by these popular libraries are now available as built-in ECMAScript features (ES5, ES6/ES2015, and later), allowing projects targeting modern browsers to eliminate these dependencies. The guide covers methods across multiple categories: - **Array**: chunk, compact, concat, difference, drop, fill, find, flatten, fromPairs, intersection, slice, and more - **Collection**: each, every, filter, groupBy, map, reduce, sortBy, uniq, and others - **Function**: bind, debounce, throttle, partial, after - **Lang**: cloneDeep, isArray, isDate, isEmpty, isNil, type checks - **Object**: assign, defaults, get, has, keys, pick, omit, toPairs - **String**: capitalize, trim, padStart/padEnd, startsWith, endsWith, template - **Number**: clamp, inRange, random - **Util**: times Each entry shows the Lodash/Underscore syntax alongside native alternatives using modern JavaScript (arrow functions, spread operator, Array.prototype methods like flat/flatMap, Object.fromEntries, etc.). Browser support tables indicate compatibility for key features. The repository also provides an ESLint plugin (`eslint-plugin-you-dont-need-lodash-underscore`) that automatically flags Lodash/Underscore usage where native equivalents exist. Installation is via npm and configuration extends the plugin's recommended ruleset. Important caveats are noted: native methods may not be null-safe like their Lodash counterparts (e.g., `Object.keys` vs `_.keys`), and some Lodash functions offer additional options not covered by native equivalents. The list is not a 1:1 comparison but a practical migration aid. The project welcomes contributions via pull requests and includes a community chat on Spectrum/Gitter. It's useful for frontend developers, library authors, and teams aiming to minimize bundle size and dependency count while maintaining modern JavaScript practices.