Gathering detailed insights and metrics for @react-hookz/deep-equal
Gathering detailed insights and metrics for @react-hookz/deep-equal
Gathering detailed insights and metrics for @react-hookz/deep-equal
Gathering detailed insights and metrics for @react-hookz/deep-equal
🚀 The fastest deep comparator for JS/TS.
npm install @react-hookz/deep-equal
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.5
Supply Chain
99.4
Quality
86.6
Maintenance
100
Vulnerability
100
License
TypeScript (98.56%)
JavaScript (1.44%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
14,716,370
Last Day
30,466
Last Week
161,994
Last Month
644,573
Last Year
6,855,904
14 Stars
231 Commits
1 Forks
2 Watching
1 Branches
4 Contributors
Latest Version
3.0.3
Package Id
@react-hookz/deep-equal@3.0.3
Unpacked Size
11.21 kB
Size
4.12 kB
File Count
5
NPM Version
10.9.2
Node Version
22.12.0
Publised On
18 Dec 2024
Cumulative downloads
Total Downloads
Last day
19.4%
30,466
Compared to previous day
Last week
8.1%
161,994
Compared to previous week
Last month
43.5%
644,573
Compared to previous month
Last year
23.8%
6,855,904
Compared to previous year
The fastest deep comparator for JS/TS.
Map
, Set
, TypedArray
, DataView
, and ArrayBuffer
.Date
, RegExp
, and NaN
.Object.create(null)
.It's as simple as:
1npm install @react-hookz/deep-equal 2# or 3yarn add @react-hookz/deep-equal
This 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
.
1import { isEqual } from '@react-hookz/deep-equal'; 2 3isEqual({ a: 1 }, { a: 1 }); // true
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.
name hz min max mean p75 p99 p995 p999 rme samples · @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 · react-fast-compare 1,690,244.66 0.0005 3.2804 0.0006 0.0006 0.0010 0.0012 0.0013 ±0.65% 1690245 · 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 · dequal 1,693,113.15 0.0005 3.2976 0.0006 0.0006 0.0007 0.0010 0.0012 ±0.65% 1693114
name hz min max mean p75 p99 p995 p999 rme samples · @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 · react-fast-compare 1,406,227.02 0.0006 0.1635 0.0007 0.0007 0.0011 0.0014 0.0016 ±0.21% 1406228 · fast-deep-equal 1,553,848.07 0.0005 2.7540 0.0006 0.0007 0.0008 0.0011 0.0013 ±0.57% 1553849 · dequal 1,026,213.59 0.0008 0.1810 0.0010 0.0010 0.0011 0.0012 0.0019 ±0.16% 1026214 slowest
To get more detailed benchmarks for different data types, run the tests directly on your own machine:
1git clone https://github.com/react-hookz/deep-equal 2cd deep-equal
1corepack enable 2yarn
1yarn benchmark
Anton Zinovyev |
Kyle Holmberg |
Pasecinic Nichita |
No vulnerabilities found.
No security vulnerabilities found.