Gathering detailed insights and metrics for quickselect.js
Gathering detailed insights and metrics for quickselect.js
npm install quickselect.js
Typescript
Module System
Node Version
NPM Version
68.3
Supply Chain
86.3
Quality
75.4
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
1,256
Last Day
1
Last Week
11
Last Month
36
Last Year
123
11 Commits
3 Watching
3 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
0.1.4
Package Id
quickselect.js@0.1.4
Unpacked Size
6.25 kB
Size
2.78 kB
File Count
9
NPM Version
6.14.5
Node Version
12.16.1
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
57.1%
11
Compared to previous week
Last month
620%
36
Compared to previous month
Last year
-9.6%
123
Compared to previous year
See: https://en.wikipedia.org/wiki/Quickselect
1/** 2 * @param {Array} array - Data 3 * @param {Number} k - Position of smallest element (starts from 0) 4 * @param {Function} accessor - Function which return value for processing (optional) 5 */ 6const element = quickSelect(array, k, accessor)
1npm i quickselect.js
or
1yarn add quickselect.js
1const data = [7, 10, 4, 3, 20, 15] 2const k = 2 3const element = quickSelect(data, k) 4console.log(element) // 7
or
1const dataWithObjects = [ 2 { value: 7 }, 3 { value: 10 }, 4 { value: 4 }, 5 { value: 3 }, 6 { value: 20 }, 7 { value: 15 }, 8] 9const k = 2 10const element = quickSelect(dataWithObjects, k, item => item.value) 11console.log(element) // { value: 7 }
1const quickSelectMedian = array => { 2 const { length } = array 3 if (length % 2) { 4 return quickSelect(array, length / 2) 5 } 6 return ( 7 0.5 * (quickSelect(array, length / 2 - 1) + quickSelect(array, length / 2)) 8 ) 9}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/7 approved changesets -- score normalized to 0
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
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
Reason
25 existing vulnerabilities detected
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