Deepdash

Deep tree-traversal methods for Lodash and plain JavaScript objects

Library
npm
v5.3.9
279stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
31/100Needs Attention
Development Activity4
Maintenance0
Community40
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
59/100Fair
Architecture60
Code Quality55
Innovation55
Learning Curve65

Deepdash extends Lodash with a family of “Deep” methods — eachDeep, filterDeep, findDeep, mapDeep, reduceDeep, pickDeep, omitDeep, keysDeep, and more — for traversing and transforming arbitrarily nested objects, arrays, and trees. It can mix its methods directly into an existing Lodash instance, or run standalone without a Lodash dependency at all.

Each traversal callback receives a rich context object (parent stack, current path, depth) so consumers can implement circular-reference detection, tree-specific childrenPath iteration, or leaves-only traversal without writing custom recursion.

What You Get

  • Deep equivalents of core Lodash methods: eachDeep, filterDeep, mapDeep, reduceDeep, someDeep, findDeep, pickDeep, omitDeep, keysDeep, pathToString, and more
  • Three consumption modes: mixin into an existing Lodash instance, cherry-pick individual methods without mutating Lodash, or use the fully standalone bundle with no Lodash dependency
  • A rich per-callback context object exposing parent stack, current path, and depth for building custom tree logic
  • Built-in circular-reference detection and a dedicated tree/childrenPath traversal mode for hierarchical data structures
  • Separate deepdash-es package providing the same API as native ES modules for lodash-es consumers

Common Use Cases

  • Filtering deeply nested JSON API responses down to matching subsets while preserving structure
  • Iterating a tree-shaped UI state (e.g. nested comments, file trees, org charts) without writing manual recursive functions
  • Redacting or omitting sensitive fields at any depth of an arbitrarily nested configuration object
  • Collecting all matching paths in a deeply nested object for validation or diffing tools

Under The Hood

Architecture: Deepdash is organized as one small module per method (eachDeep.js, filterDeep.js, pickDeep.js, etc.), each paired with an add*.js file that mixes the method into a passed-in Lodash instance and a get*.js file that returns the method as a standalone function bound to that instance; deepdash.js is the aggregate entry point that mixes in every method at once, while standalone.js re-exports cherry-picked methods pre-bound to a bundled, minimal subset of Lodash so the package works without a full Lodash dependency. Tech Stack: plain JavaScript (99.8% of the codebase) with a parallel es/ build for ES module consumers and a browser/ UMD bundle for <script>-tag usage via jsDelivr/CDN; the sibling deepdash-es npm package targets lodash-es specifically. Code Quality: the project maintains a test/ directory with unit tests plus Coveralls coverage reporting and Snyk vulnerability scanning wired into its README badges, and uses commitlint to enforce conventional commit messages; however, the repository has had very low commit activity in recent years, with the last meaningful release some time ago. API Design: each traversal method mirrors its flat Lodash counterpart’s argument order and callback signature but adds a fourth context argument (parent stack, path, depth, childrenPath option), which keeps the learning curve low for existing Lodash users while extending naturally to tree-shaped data; documentation lives on a dedicated docs site (deepdash.io) with per-method interactive examples.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search