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

@traversable/schema-deep-equal

v0.0.19

Published

<br /> <h1 align="center">แฏ“๐˜๐—ฟ๐—ฎ๐˜ƒ๐—ฒ๐—ฟ๐˜€๐—ฎ๐—ฏ๐—น๐—ฒ/๐˜€๐—ฐ๐—ต๐—ฒ๐—บ๐—ฎ-๐—ฑ๐—ฒ๐—ฒ๐—ฝ-๐—ฒ๐—พ๐˜‚๐—ฎ๐—น</h1> <br />

Downloads

23

Readme

Overview

  • An "deep equal" function" is a function that accepts 2 values, and returns a boolean indicating whether the values are made up of the same component parts.

  • The @traversable/schema-deep-equal package can be used in 2 ways:

  1. As a side-effect import, which will install a .equals method to all schemas.

  2. To derive a deep equal function from a schema recursively, by walking the schema's AST

Notable features

Portable

Derived deep equal functions are "isomorphic" -- JS-speak for "works on both the client and on the server".

That means you can use @traversable/schema-deep-equal anywhere: in the browser (they work great with state libraries that use an equality function to determine when to re-render!), in a BFF-architecture, with CloudFlare workers -- anywhere.

Performance

Our deep equal functions are:

  • 3-4x faster than node:assert/deepStrictEqual, and
  • 4-6x faster than lodash.deepEqual

If you'd like to check our math, the benchmarks are public and available here.

Drop-in replacement

  • Deep equal functions generated by @traversable/schema-deep-equal have been thoroughly fuzz-tested against millions of randomly generated inputs (via fast-check) to make the transition seamless for our users

Quick Start

You can install .equals on all schemas with a single line:

Example

import { t } from '@traversable/schema'
import '@traversable/schema-deep-equal/install'
//      โ†‘โ†‘ importing `@traversable/schema-deep-equal/install` installs `.equal` on all schemas

const Schema = t.object({
  abc: t.boolean,
  def: t.optional(t.number.min(3)),
})

let x = { abc: true, def: 10 }
let y = { ...x }
let z = { ...x, abc: false }

console.log(Object.is(x, y))     // => false ๐Ÿ˜ญ

console.log(Schema.equals(x, y)) // => true  ๐Ÿ˜Œ
console.log(Schema.equals(y, z)) // => false ๐Ÿ˜Œ

Usage

If you'd prefer not to install .equals to all schemas, use Eq.fromSchema (or you can import fromSchema directly, if you're bundle-phobic).

Example

import { t } from '@traversable/schema'
import { Eq } from '@traversable/schema-deep-equal'

const Schema = t.object({
  abc: t.boolean,
  def: t.optional(t.number.min(3)),
})

const equalsFn = Eq.fromSchema(Schema)

let x = { abc: true, def: 10 }
let y = { ...x }
let z = { ...x, abc: false }

console.log(Object.is(x, y))  // => false ๐Ÿ˜ญ

console.log(equalsFn(x, y))   // => true  ๐Ÿ˜Œ
console.log(equalsFn(y, z))   // => false ๐Ÿ˜Œ