Gathering detailed insights and metrics for array-hyper-unique
Gathering detailed insights and metrics for array-hyper-unique
npm install array-hyper-unique
Typescript
Module System
Node Version
NPM Version
TypeScript (74.2%)
JavaScript (25.8%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
2,967,071
Last Day
9,853
Last Week
50,177
Last Month
195,057
Last Year
1,571,198
156 Commits
2 Watching
1 Branches
5 Contributors
Minified
Minified + Gzipped
Latest Version
2.1.6
Package Id
array-hyper-unique@2.1.6
Unpacked Size
65.87 kB
Size
11.23 kB
File Count
21
NPM Version
lerna/6.6.2/node@v21.7.1+x64 (win32)
Node Version
21.7.1
Publised On
09 Mar 2024
Cumulative downloads
Total Downloads
Last day
17.1%
9,853
Compared to previous day
Last week
-5.6%
50,177
Compared to previous week
Last month
28.7%
195,057
Compared to previous month
Last year
139.5%
1,571,198
Compared to previous year
Get unique values of an array. Really, like deeply unique.
1{ 'array-hyper-unique': { success: 15, fail: 0, error: 0 }, 2 'array-unique-deep': { success: 11, fail: 4, error: 0 }, 3 'array-uniq': { success: 7, fail: 8, error: 0 }, 4 'just-unique': { success: 7, fail: 8, error: 0 }, 5 'arr-unique': { success: 7, fail: 8, error: 0 }, 6 'lodash.uniq': { success: 7, fail: 8, error: 0 }, 7 'array-unique': { success: 6, fail: 9, error: 0 }, 8 '@arr/unique': { success: 6, fail: 9, error: 0 }, 9 'tfk-unique-array': { success: 5, fail: 6, error: 4 } }
1import { array_unique, default as lazy_unique } from 'array-hyper-unique'; 2 3_testIt([ 4 1, 5 0, 6 true, 7 undefined, 8 null, 9 false, 10 ['a', 'b', 'c'], 11 ['a', 'b', 'c'], 12 ['a', 'c', 'b'], 13 { a: { b: 2 } }, 14 { a: { b: 2 } }, 15 { a: { b: 3 } }, 16 { a: { b: undefined } }, 17 { a: { } }, 18 { a: { b: 3, c: undefined } }, 19 ]) 20; 21 22_testIt( 23 [{a: {b: 2}}, {a: {b: 2}}, {a: {b: 3}}], 24); 25 26_testIt( 27 [1, 2, 3, 3], 28); 29 30_testIt( 31 [['a', 'b', 'c'], ['a', 'b', 'c'],], 32); 33 34function _testIt(data) 35{ 36 let actual = array_unique(data); 37 38 let actual2; 39 40 if (Array.isArray(data)) 41 { 42 actual2 = lazy_unique(...data); 43 } 44 else 45 { 46 actual2 = lazy_unique(data); 47 } 48 49 console.log(`========= input =========`); 50 51 console.dir(data); 52 53 console.log(`--------- array_unique ---------`); 54 console.dir(actual); 55 56 console.log(`--------- lazy_unique ---------`); 57 console.dir(actual2); 58}
1========= input ========= 2[ 1, 3 0, 4 true, 5 undefined, 6 null, 7 false, 8 [ 'a', 'b', 'c' ], 9 [ 'a', 'b', 'c' ], 10 [ 'a', 'c', 'b' ], 11 { a: { b: 2 } }, 12 { a: { b: 2 } }, 13 { a: { b: 3 } }, 14 { a: { b: undefined } }, 15 { a: {} }, 16 { a: { b: 3, c: undefined } } ] 17--------- array_unique --------- 18[ 1, 19 0, 20 true, 21 undefined, 22 null, 23 false, 24 [ 'a', 'b', 'c' ], 25 [ 'a', 'c', 'b' ], 26 { a: { b: 2 } }, 27 { a: { b: 3 } }, 28 { a: { b: undefined } }, 29 { a: {} }, 30 { a: { b: 3, c: undefined } } ] 31--------- lazy_unique --------- 32[ 1, 33 0, 34 true, 35 undefined, 36 null, 37 false, 38 [ 'a', 'b', 'c' ], 39 [ 'a', 'c', 'b' ], 40 { a: { b: 2 } }, 41 { a: { b: 3 } }, 42 { a: { b: undefined } }, 43 { a: {} }, 44 { a: { b: 3, c: undefined } } ] 45========= input ========= 46[ { a: { b: 2 } }, { a: { b: 2 } }, { a: { b: 3 } } ] 47--------- array_unique --------- 48[ { a: { b: 2 } }, { a: { b: 3 } } ] 49--------- lazy_unique --------- 50[ { a: { b: 2 } }, { a: { b: 3 } } ] 51========= input ========= 52[ 1, 2, 3, 3 ] 53--------- array_unique --------- 54[ 1, 2, 3 ] 55--------- lazy_unique --------- 56[ 1, 2, 3 ] 57========= input ========= 58[ [ 'a', 'b', 'c' ], [ 'a', 'b', 'c' ] ] 59--------- array_unique --------- 60[ [ 'a', 'b', 'c' ] ] 61--------- lazy_unique --------- 62[ [ 'a', 'b', 'c' ] ]
1array_unique(arr_input, { 2 checker(element, array, arr_new, arr_old) 3 { 4 let bool: boolean; 5 6 // do equal check 7 8 return bool; 9 }, 10 11 // overwrite source array 12 overwrite: true, 13})
[LOG] main mixin test
--------------
[SUCCESS] array-hyper-unique
[FAIL] array-uniq
[FAIL] array-unique
[FAIL] @arr/unique
[ERROR] tfk-unique-array Unexpected token u in JSON at position 0
[FAIL] just-unique
[FAIL] arr-unique
[FAIL] array-unique-deep
[FAIL] lodash.uniq
[LOG] object
--------------
[SUCCESS] array-hyper-unique
[FAIL] array-uniq
[FAIL] array-unique
[FAIL] @arr/unique
[SUCCESS] tfk-unique-array
[FAIL] just-unique
[SUCCESS] arr-unique
[SUCCESS] array-unique-deep
[FAIL] lodash.uniq
[LOG] number
--------------
[SUCCESS] array-hyper-unique
[SUCCESS] array-uniq
[SUCCESS] array-unique
[SUCCESS] @arr/unique
[SUCCESS] tfk-unique-array
[SUCCESS] just-unique
[SUCCESS] arr-unique
[SUCCESS] array-unique-deep
[SUCCESS] lodash.uniq
[LOG] number 2
--------------
[SUCCESS] array-hyper-unique
[SUCCESS] array-uniq
[FAIL] array-unique
[FAIL] @arr/unique
[FAIL] tfk-unique-array
[SUCCESS] just-unique
[FAIL] arr-unique
[SUCCESS] array-unique-deep
[SUCCESS] lodash.uniq
[LOG] string
--------------
[SUCCESS] array-hyper-unique
[SUCCESS] array-uniq
[SUCCESS] array-unique
[SUCCESS] @arr/unique
[SUCCESS] tfk-unique-array
[SUCCESS] just-unique
[SUCCESS] arr-unique
[SUCCESS] array-unique-deep
[SUCCESS] lodash.uniq
[LOG] string[]
--------------
[SUCCESS] array-hyper-unique
[FAIL] array-uniq
[FAIL] array-unique
[FAIL] @arr/unique
[SUCCESS] tfk-unique-array
[FAIL] just-unique
[FAIL] arr-unique
[SUCCESS] array-unique-deep
[FAIL] lodash.uniq
[LOG] RegExp
--------------
[SUCCESS] array-hyper-unique
[FAIL] array-uniq
[FAIL] array-unique
[FAIL] @arr/unique
[FAIL] tfk-unique-array
[FAIL] just-unique
[FAIL] arr-unique
[SUCCESS] array-unique-deep
[FAIL] lodash.uniq
[LOG] boolean
--------------
[SUCCESS] array-hyper-unique
[SUCCESS] array-uniq
[SUCCESS] array-unique
[SUCCESS] @arr/unique
[SUCCESS] tfk-unique-array
[SUCCESS] just-unique
[SUCCESS] arr-unique
[SUCCESS] array-unique-deep
[SUCCESS] lodash.uniq
[LOG] boolean 2
--------------
[SUCCESS] array-hyper-unique
[SUCCESS] array-uniq
[SUCCESS] array-unique
[SUCCESS] @arr/unique
[ERROR] tfk-unique-array Unexpected token u in JSON at position 0
[SUCCESS] just-unique
[FAIL] arr-unique
[SUCCESS] array-unique-deep
[SUCCESS] lodash.uniq
[LOG] Map
--------------
[SUCCESS] array-hyper-unique
[FAIL] array-uniq
[FAIL] array-unique
[FAIL] @arr/unique
[FAIL] tfk-unique-array
[FAIL] just-unique
[SUCCESS] arr-unique
[SUCCESS] array-unique-deep
[FAIL] lodash.uniq
[LOG] function
--------------
[SUCCESS] array-hyper-unique
[SUCCESS] array-uniq
[SUCCESS] array-unique
[SUCCESS] @arr/unique
[ERROR] tfk-unique-array Unexpected token u in JSON at position 0
[SUCCESS] just-unique
[SUCCESS] arr-unique
[FAIL] array-unique-deep
[SUCCESS] lodash.uniq
[LOG] function 2
--------------
[SUCCESS] array-hyper-unique
[FAIL] array-uniq
[FAIL] array-unique
[FAIL] @arr/unique
[ERROR] tfk-unique-array Unexpected token u in JSON at position 0
[FAIL] just-unique
[SUCCESS] arr-unique
[FAIL] array-unique-deep
[FAIL] lodash.uniq
[LOG] Buffer
--------------
[SUCCESS] array-hyper-unique
[FAIL] array-uniq
[FAIL] array-unique
[FAIL] @arr/unique
[FAIL] tfk-unique-array
[FAIL] just-unique
[FAIL] arr-unique
[SUCCESS] array-unique-deep
[FAIL] lodash.uniq
[LOG] ArrayBuffer
--------------
[SUCCESS] array-hyper-unique
[SUCCESS] array-uniq
[SUCCESS] array-unique
[SUCCESS] @arr/unique
[FAIL] tfk-unique-array
[SUCCESS] just-unique
[FAIL] arr-unique
[FAIL] array-unique-deep
[SUCCESS] lodash.uniq
[LOG] Buffer & ArrayBuffer
--------------
[SUCCESS] array-hyper-unique
[FAIL] array-uniq
[FAIL] array-unique
[FAIL] @arr/unique
[FAIL] tfk-unique-array
[FAIL] just-unique
[FAIL] arr-unique
[SUCCESS] array-unique-deep
[FAIL] lodash.uniq
1{ 2 'array-hyper-unique': { success: 15, fail: 0, error: 0 }, 3 'array-unique-deep': { success: 11, fail: 4, error: 0 }, 4 'array-uniq': { success: 7, fail: 8, error: 0 }, 5 'just-unique': { success: 7, fail: 8, error: 0 }, 6 'arr-unique': { success: 7, fail: 8, error: 0 }, 7 'lodash.uniq': { success: 7, fail: 8, error: 0 }, 8 'array-unique': { success: 6, fail: 9, error: 0 }, 9 '@arr/unique': { success: 6, fail: 9, error: 0 }, 10 'tfk-unique-array': { success: 5, fail: 6, error: 4 } 11}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
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
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
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