Gathering detailed insights and metrics for sort-keys
Gathering detailed insights and metrics for sort-keys
npm install sort-keys
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.6
Supply Chain
84.7
Quality
76.6
Maintenance
100
Vulnerability
100
License
JavaScript (90.54%)
TypeScript (9.46%)
Total Downloads
3,663,759,817
Last Day
1,868,879
Last Week
8,354,144
Last Month
38,131,526
Last Year
529,525,287
102 Stars
38 Commits
20 Forks
7 Watching
1 Branches
9 Contributors
Minified
Minified + Gzipped
Latest Version
5.1.0
Package Id
sort-keys@5.1.0
Unpacked Size
5.33 kB
Size
2.30 kB
File Count
5
NPM Version
10.6.0
Node Version
18.20.2
Publised On
06 Sept 2024
Cumulative downloads
Total Downloads
Last day
-5.3%
1,868,879
Compared to previous day
Last week
-16.8%
8,354,144
Compared to previous week
Last month
3.2%
38,131,526
Compared to previous month
Last year
-9.8%
529,525,287
Compared to previous year
1
Sort the keys of an object
Useful to get a deterministically ordered object, as the order of keys can vary between engines.
1npm install sort-keys
1import sortKeys from 'sort-keys'; 2 3sortKeys({c: 0, a: 0, b: 0}); 4//=> {a: 0, b: 0, c: 0} 5 6sortKeys({b: {b: 0, a: 0}, a: 0}, {deep: true}); 7//=> {a: 0, b: {a: 0, b: 0}} 8 9sortKeys({b: [{b: 0, a: 0}], a: 0}, {deep: true}); 10//=> {a: 0, b: [{a: 0, b: 0}]} 11 12sortKeys({c: 0, a: 0, b: 0}, { 13 compare: (a, b) => -a.localeCompare(b) 14}); 15//=> {c: 0, b: 0, a: 0} 16 17sortKeys([{b: 0, a:2}], {deep: true}); 18//=> [{a: 2, b: 0}]
Returns a new object with sorted keys.
Type: object | Array
Type: object
Type: boolean
Default: false
Recursively sort keys, including keys of objects inside arrays.
Type: Function
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 9/30 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
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 More