{"id":19484305,"url":"https://github.com/react-hookz/deep-equal","last_synced_at":"2025-04-25T16:33:31.554Z","repository":{"id":36987019,"uuid":"446793474","full_name":"react-hookz/deep-equal","owner":"react-hookz","description":"Deep equality check","archived":false,"fork":false,"pushed_at":"2024-04-25T00:15:42.000Z","size":1224,"stargazers_count":10,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-25T02:01:15.136Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/react-hookz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-11T11:28:10.000Z","updated_at":"2024-06-18T18:22:44.486Z","dependencies_parsed_at":"2024-02-04T09:36:26.130Z","dependency_job_id":"98376a53-f6b3-483d-92d2-a73a1d56e28e","html_url":"https://github.com/react-hookz/deep-equal","commit_stats":{"total_commits":179,"total_committers":5,"mean_commits":35.8,"dds":"0.11731843575418999","last_synced_commit":"d60f0eef811715bacae1cb1b215925ca90ca92f6"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-hookz%2Fdeep-equal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-hookz%2Fdeep-equal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-hookz%2Fdeep-equal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-hookz%2Fdeep-equal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-hookz","download_url":"https://codeload.github.com/react-hookz/deep-equal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224008953,"owners_count":17240483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T20:20:19.688Z","updated_at":"2025-04-25T16:33:31.528Z","avatar_url":"https://github.com/react-hookz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!CAUTION]\n\u003e __PACKAGE IS DEPRECATED AND WILL BE DETED SOON__  \n\u003e USE [@ver0/deep-equal](https://github.com/ver0-project/deep-equal) instead\n\n\u003cdiv align=\"center\"\u003e\n\n# @react-hookz/deep-equal\n\n[![NPM Version](https://img.shields.io/npm/v/%40react-hookz%2Fdeep-equal?style=flat-square)](https://www.npmjs.com/package/@react-hookz/deep-equal)\n[![NPM Downloads](https://img.shields.io/npm/dm/%40react-hookz%2Fdeep-equal?style=flat-square)](https://www.npmjs.com/package/@react-hookz/deep-equal)\n![Dependents (via libraries.io), scoped npm package](https://img.shields.io/librariesio/dependents/npm/%40react-hookz/deep-equal?style=flat-square)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/react-hookz/deep-equal/CI.yml?style=flat-square)\n![Codecov](https://img.shields.io/codecov/c/github/react-hookz/deep-equal?style=flat-square)\n![NPM Type Definitions](https://img.shields.io/npm/types/%40react-hookz%2Fdeep-equal?style=flat-square)\n\n× **[DISCORD](https://discord.gg/Fjwphtu65f)** ×\n\n\u003c/div\u003e\n\n---\n\n**The fastest deep comparator for JS/TS.**\n\n---\n\n## Features 🚀\n\n- ✅ Handles ES6+ structures like `Map`, `Set`, `TypedArray`, `DataView`, and `ArrayBuffer`.\n- ✅ Supports `Date`, `RegExp`, and `NaN`.\n- ✅ Safe handling of React and Preact objects (no stack overflow).\n- ✅ Works seamlessly with objects created via `Object.create(null)`.\n- ⚠️ **Circular reference handling**:\n\t- **Supported**: React and Preact objects.\n\t- **Not supported**: Other objects (causes stack overflow).\n\n---\n\n## Installation 📦\n\nIt's as simple as:\n\n```bash\nnpm install @react-hookz/deep-equal\n# or\nyarn add @react-hookz/deep-equal\n```\n\n---\n\n## Usage 💡\n\n### Importing\n\nThis package is distributed using the ESNext language level and ES module system. Depending on your target environment, you might need to transpile the package. Check your bundler's documentation for instructions on transpiling `node_modules`.\n\n```typescript\nimport { isEqual } from '@react-hookz/deep-equal';\n\nisEqual({ a: 1 }, { a: 1 }); // true\n```\n\n---\n\n## Performance ⚡\n\n**Note**: Benchmarks were conducted on specific datasets (available in the `src/fixtures` directory). Your results may vary depending on your data and use case. Running benchmarks on your dataset is recommended.\n\n### Simple Data (non-ES6+)\n\n\u003cpre\u003e\n\t name                               hz     min     max    mean     p75     p99    p995    p999     rme  samples\n · @react-hookz/deep-equal  1,780,770.64  0.0005  0.7278  0.0006  0.0006  0.0010  0.0011  0.0013  ±0.18%  1780771   fastest\n · react-fast-compare       1,690,244.66  0.0005  3.2804  0.0006  0.0006  0.0010  0.0012  0.0013  ±0.65%  1690245\n · fast-deep-equal          1,663,437.00  0.0005  3.5417  0.0006  0.0006  0.0010  0.0011  0.0012  ±0.70%  1663438   slowest\n · dequal                   1,693,113.15  0.0005  3.2976  0.0006  0.0006  0.0007  0.0010  0.0012  ±0.65%  1693114\n\u003c/pre\u003e\n\n### Complex Data (ES6+)\n\n\u003cpre\u003e\n\t name                               hz     min     max    mean     p75     p99    p995    p999     rme  samples\n · @react-hookz/deep-equal  1,725,589.83  0.0005  0.2565  0.0006  0.0006  0.0009  0.0010  0.0012  ±0.20%  1725590   fastest\n · react-fast-compare       1,406,227.02  0.0006  0.1635  0.0007  0.0007  0.0011  0.0014  0.0016  ±0.21%  1406228\n · fast-deep-equal          1,553,848.07  0.0005  2.7540  0.0006  0.0007  0.0008  0.0011  0.0013  ±0.57%  1553849\n · dequal                   1,026,213.59  0.0008  0.1810  0.0010  0.0010  0.0011  0.0012  0.0019  ±0.16%  1026214   slowest\n\u003c/pre\u003e\n\n---\n\n## Run Benchmarks Locally 🛠️\n\nTo get more detailed benchmarks for different data types, run the tests directly on your own machine:\n\n1. Clone the repository:\n\t```bash\n\tgit clone https://github.com/react-hookz/deep-equal\n\tcd deep-equal\n\t```\n2. Install dependencies:\n\t```bash\n\tcorepack enable\n\tyarn\n\t```\n3. Run benchmarks:\n\t```bash\n\tyarn benchmark\n\t```\n\n---\n\n## Contributors\n\n\u003c!-- readme: collaborators,contributors,semantic-release-bot/-,lint-action/- -start --\u003e\n\u003ctable\u003e\n\t\u003ctbody\u003e\n\t\t\u003ctr\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/xobotyi\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/6178739?v=4\" width=\"100;\" alt=\"xobotyi\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003eAnton Zinovyev\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/kylemh\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/9523719?v=4\" width=\"100;\" alt=\"kylemh\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003eKyle Holmberg\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/nichita-pasecinic\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/98735377?v=4\" width=\"100;\" alt=\"nichita-pasecinic\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003ePasecinic Nichita\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\u003ctbody\u003e\n\u003c/table\u003e\n\u003c!-- readme: collaborators,contributors,semantic-release-bot/-,lint-action/- -end --\u003e\n\n## Related projects\n\n- [@react-hookz/web](https://github.com/react-hookz/web) - React hooks done right, for browser and\n\tSSR.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-hookz%2Fdeep-equal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-hookz%2Fdeep-equal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-hookz%2Fdeep-equal/lists"}