fast-deep-equal

The fastest zero-dependency deep equality check for JavaScript, with Date, RegExp, Map, Set and typed-array support.

Library
npm
v3.1.3
2,049stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
43/100Fair
Development Activity0
Maintenance20
Community52
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
87/100Excellent
Architecture80
Code Quality85
Innovation88
Learning Curve95

fast-deep-equal is a tiny, zero-dependency JavaScript library that performs the fastest possible deep equality comparison between two arbitrary values. It recursively walks objects and arrays and compares Date and RegExp instances by value, returning a simple boolean.

Beyond the default ES5-compatible build, an optional ES6 variant adds equality for Maps, Sets, and typed arrays, and a React-aware variant skips the circular _owner property on React elements. It is one of the most widely depended-on packages on npm, used internally by validators, memoization helpers, and UI libraries.

What You Get

  • A single equal(a, b) function that returns a boolean for deep structural equality.
  • Multiple prebuilt entry points: default (ES5), fast-deep-equal/es6, and React-aware fast-deep-equal/react.
  • Correct value comparison for Date and RegExp objects, plus optional Map, Set, and typed-array support in the ES6 build.
  • TypeScript type definitions with a type-guard signature (actual is T).
  • Zero runtime dependencies and a footprint small enough to inline into any bundle.

Common Use Cases

  • Skipping unnecessary re-renders in UI frameworks by comparing previous and next props or state.
  • Deduplicating or diffing configuration and API response objects.
  • Powering memoization and caching layers that key on structural equality.
  • Writing assertions and equality checks inside test helpers and validators.

Under The Hood

Architecture The entire library is a single recursive equal(a, b) function. It short-circuits on reference identity, then, for two objects sharing a constructor, branches by shape: arrays are compared element-by-element in a reverse-counting loop, RegExps by source/flags, and any object with a custom valueOf/toString by that value, before falling back to key-by-key recursion over Object.keys. NaN is treated as equal to NaN. All builds are generated from one src/index.jst doT template by build.js, which stamps out the ES5 default (index.js), the ES6 variant with Map/Set/typed-array branches, and React variants that skip the circular _owner property.

Tech Stack Plain ES5 JavaScript with no runtime dependencies. Build tooling is minimal: the dot templating engine generates the distributable files, ESLint enforces style, and TypeScript is used only to type-check the shipped index.d.ts. Tests run on Mocha with nyc for coverage. The published package ships index.js, react.js, es6/, and .d.ts type definitions.

Code Quality The implementation is a compact, carefully ordered set of type checks with performance-motivated idioms (reverse for loops, early returns). A data-driven spec suite (spec/tests.js, spec/es6tests.js) exercises scalars, nested structures, special objects, Maps, Sets, typed arrays, and React elements, and the project reports coverage via nyc/coveralls. Because the runtime files are template-generated, contributors edit src/index.jst rather than the .js outputs directly.

API Design The developer experience is essentially frictionless: a single default export called with two arguments returns a boolean, and the three entry points (fast-deep-equal, fast-deep-equal/es6, fast-deep-equal/react) let consumers opt into exactly the type support they need. The TypeScript signature doubles as a type guard (actual is T), and the README documents install, usage, and benchmarks concisely. There is no configuration or setup boilerplate.

Used by 32 apps in this directory

TypeScript
59%
Other

agenta

Developer Tools · Devops · AI Development

4,489

The open-source LLMOps platform unifying prompt engineering, evaluation, and observability for teams building reliable LLM applications.

View details
91
Repo Health
77
Technical
67
Dependency
Built with
TypeScript59%
Python39%
Updated today
TypeScript
66%
Apache 2.0

Appsmith

Developer Tools · Automation · No Code Platforms

40,707

Open-source low-code platform to build admin panels, dashboards, and internal tools connected to any database or API.

View details
94
Repo Health
79
Technical
68
Dependency
Built with
TypeScript66%
Java22%
Updated today
TypeScript
49%
MPL 2.0

Artillery

Devops · Developer Tools

9,054

Cloud-scale load testing and functional testing for APIs, WebSockets, gRPC, and headless browsers, distributed across AWS Lambda or Fargate with zero infrastructure to manage.

View details
89
Repo Health
73
Technical
68
Dependency
Built with
TypeScript49%
JavaScript48%
Updated 5 days ago
TypeScript
97%
AGPL 3.0

Bigcapital

Invoicing Finance

3,846

Self-hostable double-entry accounting platform with invoicing, inventory, multi-currency, and real-time financial reporting for small and medium businesses.

View details
91
Repo Health
77
Technical
64
Dependency
Built with
TypeScript97%
Updated yesterday
Rust
67%
MIT

Bun

Developer Tools

95,452

An all-in-one JavaScript and TypeScript toolkit — one Rust-and-JavaScriptCore binary that replaces Node.js, npm, a bundler, and a test runner with faster equivalents.

View details
92
Repo Health
91
Technical
66
Dependency
Built with
Rust67%
C++19%
Updated today
TypeScript
97%
Apache 2.0

Cline

AI Code Assistants

66,453

An open-source AI coding agent that lives in your editor and terminal — reads and edits your codebase, runs commands, browses the web, and requires human approval for every action by default.

View details
90
Repo Health
74
Technical
67
Dependency
Built with
TypeScript97%
Updated today
TypeScript
50%
Other

Dify

No Code Platforms · AI Development · Developer Tools

152,883

Visual LLM workflow platform with RAG pipelines, agent capabilities, and model management for building production AI applications.

View details
92
Repo Health
85
Technical
71
Dependency
Built with
TypeScript50%
Python47%
Updated today
TypeScript
92%
MIT

Dittofeed

Marketing · Automation

2,903

Open-source omni-channel customer engagement platform for automating transactional and marketing messages via email, SMS, WhatsApp, Slack, and mobile push.

View details
54
Repo Health
75
Technical
63
Dependency
Built with
TypeScript92%
Updated 4 months ago
TypeScript
48%
AGPL 3.0

Grafana

Monitoring · Analytics

76,300

The open-source observability platform that unifies metrics, logs, and traces from any data source into dynamic, queryable dashboards.

View details
95
Repo Health
91
Technical
65
Dependency
Built with
TypeScript48%
Go46%
Updated today

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