finds.dev← search

// the find

jashkenas/underscore

★ 27,342 · JavaScript · MIT · updated Apr 2026

JavaScript's utility _ belt

Underscore is the original JavaScript utility library — map, filter, reduce, debounce, throttle, template, and about 100 more functions for arrays, objects, and functions. It predates ES5 being widely available and was genuinely essential then. Today most of what it does is in the language itself or covered by Lodash.

The ESM module split (each function in its own file under modules/) means tree-shaking actually works — you can import just debounce or throttle without pulling in the whole library. The source is genuinely readable, each module is short and does one thing. Test coverage across arrays, collections, functions, and objects is thorough and has been battle-hardened over 15 years. The chaining API is clean and predictable if you need it.

Most of the API surface is now redundant with native JS — Array.prototype.map/filter/reduce/find/flat are in every runtime worth targeting, and optional chaining plus nullish coalescing replace a lot of the object utilities. Lodash has eaten its lunch on the non-native stuff and is more actively developed. TypeScript types exist but are bolted on via DefinitelyTyped, not authored here, so they lag. The template function is a footgun — it uses eval internally and has well-documented XSS risks if you pass untrusted strings.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →