A chai plugin to match objects and arrays deep equality with arrays (including nested ones) being in any order.
Installations
npm install deep-equal-in-any-order
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
14.21.3
NPM Version
7.7.6
Score
98.6
Supply Chain
78.7
Quality
76.1
Maintenance
100
Vulnerability
99.3
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
oprogramador
Download Statistics
Total Downloads
37,134,415
Last Day
4,903
Last Week
4,903
Last Month
1,523,986
Last Year
19,975,880
GitHub Statistics
16 Stars
229 Commits
8 Forks
4 Watching
6 Branches
5 Contributors
Bundle Size
83.07 kB
Minified
28.18 kB
Minified + Gzipped
Package Meta Information
Latest Version
2.0.6
Package Id
deep-equal-in-any-order@2.0.6
Unpacked Size
6.17 kB
Size
2.54 kB
File Count
4
NPM Version
7.7.6
Node Version
14.21.3
Publised On
19 Mar 2023
Total Downloads
Cumulative downloads
Total Downloads
37,134,415
Last day
0%
4,903
Compared to previous day
Last week
-98.6%
4,903
Compared to previous week
Last month
-8.3%
1,523,986
Compared to previous month
Last year
244.5%
19,975,880
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Dev Dependencies
22
deep-equal-in-any-order
Chai plugin to match objects and arrays deep equality with arrays (including nested ones) being in any order.
It works in similar way as deep.equal
but it doesn't checks the arrays order (at any level of nested objects and arrays). The array elements can be any JS entity (boolean, null, number, string, object, array...).
install
npm i --save deep-equal-in-any-order
or
yarn add deep-equal-in-any-order
usage
expect
1const deepEqualInAnyOrder = require('deep-equal-in-any-order'); 2const chai = require('chai'); 3 4chai.use(deepEqualInAnyOrder); 5 6const { expect } = chai; 7 8expect([1, 2]).to.deep.equalInAnyOrder([2, 1]); 9expect([1, 2]).to.not.deep.equalInAnyOrder([2, 1, 3]); 10expect({ foo: [1, 2], bar: [4, 89, 22] }).to.deep.equalInAnyOrder({ foo: [2, 1], bar: [4, 22, 89] }); 11expect({ foo: ['foo-1', 'foo-2', [1, 2], null ] }).to.deep.equalInAnyOrder({ foo: [null, [1, 2], 'foo-1', 'foo-2'] }); 12expect({ foo: [1, 2], bar: { baz: ['a', 'b', { lorem: [5, 6] }] } }).to.deep.equalInAnyOrder({ foo: [2, 1], bar: { baz: ['b', 'a', { lorem: [6, 5] }] } });
assert
1const deepEqualInAnyOrder = require('deep-equal-in-any-order'); 2const chai = require('chai'); 3 4chai.use(deepEqualInAnyOrder); 5 6const { assert } = chai; 7 8assert.deepEqualInAnyOrder([1, 2], [2, 1]); 9assert.notDeepEqualInAnyOrder(1, 2], [2, 1, 3]); 10assert.deepEqualInAnyOrder({ foo: [1, 2], bar: [4, 89, 22] }, { foo: [2, 1], bar: [4, 22, 89] }); 11assert.deepEqualInAnyOrder({ foo: ['foo-1', 'foo-2', [1, 2], null ] }, { foo: [null, [1, 2], 'foo-1', 'foo-2'] }); 12assert.deepEqualInAnyOrder({ foo: [1, 2], bar: { baz: ['a', 'b', { lorem: [5, 6] }] } }, { foo: [2, 1], bar: { baz: ['b', 'a', { lorem: [6, 5] }] } });
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE.txt:0
- Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0
Reason
0 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 1
Reason
Found 1/24 approved changesets -- 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
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 7 are checked with a SAST tool
Reason
36 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-2h3h-q99f-3fhc
- Warn: Project is vulnerable to: GHSA-gmw6-94gg-2rc2
- Warn: Project is vulnerable to: GHSA-hxwm-x553-x359
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3
- Warn: Project is vulnerable to: MAL-2023-462
- Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp
- Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw
- Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
Score
2.1
/10
Last Scanned on 2025-01-27
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 MoreOther packages similar to deep-equal-in-any-order
sort-any
Sorts any JavaScript array in a predictable way (deep equal arrays are always sorted in the same order)
@types/deep-equal-in-any-order
TypeScript definitions for deep-equal-in-any-order
chai-deep-equal-in-any-order
chai plugin to match objects and arrays deep equality with arrays (including nested ones) being in any order
@juigorg/mollitia-sint
a library that takes two files as an input and finds any matching patterns of bytes between them (Can be very very slow)