npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bybrave/fast-deep-equal2

v4.0.0

Published

Maintained fork of fast-deep-equal — fast deep equality with the null-prototype crash fixed (#49), a circular-safe variant (#17), Map/Set/TypedArray support built in, ESM, and bundled types

Readme

@bybrave/fast-deep-equal2

Maintained, drop-in fork of fast-deep-equal — the fastest deep-equality check for JavaScript.

The original has had no release since 2020 (3.1.3) while still pulling ~710M downloads/month. This fork fixes the null-prototype crash, adds a circular-safe variant, folds Map/Set/TypedArray support into the default function, and ships ESM plus improved bundled types.

npm install @bybrave/fast-deep-equal2
const equal = require('@bybrave/fast-deep-equal2');   // CommonJS
import equal from '@bybrave/fast-deep-equal2';         // ESM
import { equal, react, circular } from '@bybrave/fast-deep-equal2';

equal({ a: 1, b: [2, 3] }, { a: 1, b: [2, 3] }); // true

The default equal(a, b) is the same fast function as upstream, and remains a TypeScript type guard (a is T). Map, Set, TypedArray and BigInt are compared out of the box — no separate es6 entry needed.

What's fixed

| Issue | Problem | Fix | |---|---|---| | #49 / #111 | Comparing objects created with Object.create(null) threw a.valueOf is not a function (21+ 👍). | valueOf/toString are only called when the object actually overrides them and they're callable — null-prototype objects compare by their own keys instead. | | #17 | Circular references caused a RangeError (stack overflow). | New circular export tracks visited pairs and handles cycles. The default equal stays allocation-free and fast. | | #81 | Type fixes weren't shipped. | Bundled, improved types (default + react + circular), verified with tsc --strict. | | — | Map/Set/TypedArray lived in a separate es6 entry. | Folded into the default function (Node 18+ has them). |

Exports

  • equal(a, b) (default) — fast deep equality, Map/Set/TypedArray/BigInt aware, null-prototype safe. Throws on circular references (use circular for those).
  • circular(a, b) — same, but safe against circular references (tracks visited object pairs; slightly slower).
  • react(a, b) — ignores React elements' circular _owner. Also available as the subpath @bybrave/fast-deep-equal2/react for drop-in parity with fast-deep-equal/react.

Migration from fast-deep-equal

Replace the dependency and the import. equal behaves the same, except comparing Object.create(null) objects now works instead of throwing. If you imported fast-deep-equal/es6, just use the default — Map/Set/TypedArray are built in. fast-deep-equal/react@bybrave/fast-deep-equal2/react.

Support

If this package saves you time, you can support maintenance:

Ko-fi Bitcoin

Bitcoin (BTC): bc1q37557q5jpeaxqydzwvf3jgj7zhnfpn2td3q40q

Credits & license

MIT, same as the original — see LICENSE. Based on fast-deep-equal by Evgeny Poberezkin.