Installations
npm install qcompare
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
16.8.0
NPM Version
8.1.3
Score
72.1
Supply Chain
99.3
Quality
76.1
Maintenance
100
Vulnerability
100
License
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
Yuriy-Khomenko
Download Statistics
Total Downloads
5,643
Last Day
8
Last Week
103
Last Month
296
Last Year
1,342
GitHub Statistics
6 Stars
37 Commits
2 Watching
1 Branches
1 Contributors
Bundle Size
5.22 kB
Minified
1.17 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.4.7
Package Id
qcompare@1.4.7
Unpacked Size
410.63 kB
Size
74.35 kB
File Count
8
NPM Version
8.1.3
Node Version
16.8.0
Total Downloads
Cumulative downloads
Total Downloads
5,643
Last day
-27.3%
8
Compared to previous day
Last week
35.5%
103
Compared to previous week
Last month
127.7%
296
Compared to previous month
Last year
15.2%
1,342
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
No dependencies detected.
qcompare
the fastest function for comparing two js objects compatible with es6
Install
npm install --save qcompare
Usage
const qcompare = require( 'qcompare');
1qcompare( { foo: 1 }, { foo: 1 } ); // true 2qcompare( { bar: 1 }, { bar: 2 } ); // false
Features
- support for all new classes ES6;
- very quickly compares;
- correctly compares:
- does not support circular objects;
- object-keys for the Map are compared by reference;
Benchmarks
Nodejs - v16.8.0
Date - 07.12.2022
Synthetic test, iteration for a large object
qcompare - 5.663s
nano-equal - 8.679s
dequal - 8.265s
fast-deep-equal - 7.330s
fast-equals - 43.327ms
react-fast-compare - 7.969s
lodash.isequal - 43.291s
For more balanced testing of performance, tests of other projects were used
fast-deep-equal v3.1.3 project test result
qcompare x 328,360 ops/sec ±0.27% (92 runs sampled)
fast-deep-equal x 275,325 ops/sec ±0.54% (92 runs sampled)
fast-deep-equal/es6 x 229,257 ops/sec ±0.43% (97 runs sampled)
fast-equals x 257,231 ops/sec ±0.31% (94 runs sampled)
nano-equal x 173,235 ops/sec ±0.29% (96 runs sampled)
shallow-equal-fuzzy x 119,923 ops/sec ±0.45% (94 runs sampled)
underscore.isEqual x 79,648 ops/sec ±0.77% (93 runs sampled)
lodash.isEqual x 36,797 ops/sec ±0.65% (96 runs sampled)
deep-equal x 87.99 ops/sec ±4.44% (42 runs sampled)
deep-eql x 23,791 ops/sec ±0.78% (93 runs sampled)
ramda.equals x 10,551 ops/sec ±1.65% (95 runs sampled)
util.isDeepStrictEqual x 49,437 ops/sec ±0.58% (96 runs sampled)
assert.deepStrictEqual x 579 ops/sec ±0.40% (93 runs sampled)
The fastest is qcompare
fast-equals v4.0.3 project test result
Ops / sec | |
---|---|
qcompare | 5Â 492,983 |
fast-equals | 3Â 495,332 |
deep-eql | 1Â 880,796 |
fast-equals (circular) | 1Â 859,143 |
fast-deep-equal | 1Â 783,733 |
react-fast-compare | 1Â 556,482 |
nano-equal | 652,388 |
underscore.isEqual | 445,516 |
lodash.isEqual | 219,295 |
assert.deepStrictEqual | 10,583 |
deep-equal | 0,671 |
dequal v2.0.3 project test result
(basic) Benchmark:
assert.deepStrictEqual x 242,497 ops/sec ±0.90% (92 runs sampled)
util.isDeepStrictEqual x 243,227 ops/sec ±0.88% (95 runs sampled)
fast-deep-equal x 1,283,468 ops/sec ±0.44% (95 runs sampled)
lodash.isEqual x 265,328 ops/sec ±0.86% (94 runs sampled)
nano-equal x 969,216 ops/sec ±1.06% (95 runs sampled)
dequal/lite x 1,350,907 ops/sec ±2.40% (93 runs sampled)
dequal x 1,360,938 ops/sec ±0.87% (94 runs sampled)
qcompare x 2,216,972 ops/sec ±0.70% (95 runs sampled)
(complex) Benchmark(excluding object-keys for the Map):
assert.deepStrictEqual x 112,922 ops/sec ±0.95% (93 runs sampled)
util.isDeepStrictEqual x 113,051 ops/sec ±1.08% (95 runs sampled)
lodash.isEqual x 52,685 ops/sec ±1.18% (89 runs sampled)
dequal x 467,948 ops/sec ±0.51% (95 runs sampled)
qcompare x 1,158,099 ops/sec ±1.43% (92 runs sampled)
License
MIT Yuriy Khomenko
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 existing vulnerabilities detected
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/10
Last Scanned on 2025-02-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More