Gathering detailed insights and metrics for hyperdyperid
Gathering detailed insights and metrics for hyperdyperid
Gathering detailed insights and metrics for hyperdyperid
Gathering detailed insights and metrics for hyperdyperid
Very fast base-36 ID generator and random integer generator for Node.js
npm install hyperdyperid
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
12 Stars
25 Commits
3 Watching
2 Branches
2 Contributors
Updated on 11 Nov 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
0.7%
530,901
Compared to previous day
Last week
5.2%
2,715,896
Compared to previous week
Last month
25.6%
10,903,585
Compared to previous month
Last year
6,252.8%
45,670,303
Compared to previous year
hyperdyperid
Fastest random ID and random string generation for Node.js
str3_36
— generates random 3 character Base36 alphanumeric string.str5_36
— generates random 5 character Base36 alphanumeric string.str6_36
— generates random 6 character Base36 alphanumeric string.str10_36
— generates random 10 character alphanumeric string.str(len [, alphabet])
— generates any length random string using an alphabet
. Use like str(10, '0123456789')
.hyperid
— generates "hyperid" like ID.xorshift32
— iterates through pseudo random numbers using "xorshift32" algorithm. This used
to be the algorithm behind Math.random()
in V8, then it switched to "xorshift64".randomU32(min, max)
— generate a random 32-bit integer.Install
yarn add hyperdyperid
Generate base36 10-character string:
1const {str10_36} = require('hyperdyperid/lib/str10_36'); 2 3str10_36(); 4// lxifpmidcr 5// cn41vpmtxo 6// dj2u5ghp3r 7// 6yro5d0g9l
Ran on Mac Mini M1.
Random ID generation:
node -v
v16.14.2
node benchmarks/main.js
hyperdyperid xorshift32() x 241,258,490 ops/sec ±1.97% (78 runs sampled)
hyperdyperid str3_36() x 203,361,942 ops/sec ±1.57% (82 runs sampled)
hyperdyperid str5_36() x 124,134,559 ops/sec ±1.74% (85 runs sampled)
hyperdyperid str6_36() x 125,011,053 ops/sec ±2.48% (70 runs sampled)
hyperdyperid str10_36() x 19,445,199 ops/sec ±1.92% (84 runs sampled)
hyperdyperid str(5) x 5,940,801 ops/sec ±1.70% (82 runs sampled)
hyperdyperid str(10) x 2,798,758 ops/sec ±1.45% (65 runs sampled)
hyperdyperid hyperid() x 26,317,209 ops/sec ±2.61% (76 runs sampled)
hyperid x 17,018,022 ops/sec ±1.66% (84 runs sampled)
Math.random() x 72,294,752 ops/sec ±1.65% (83 runs sampled)
Math.random().toString() x 4,503,932 ops/sec ±2.68% (80 runs sampled)
nanoid x 470,470 ops/sec ±3.17% (77 runs sampled)
shortid x 41,870 ops/sec ±6.21% (67 runs sampled)
Fastest is hyperdyperid xorshift32()
Random integer generation:
node -v
v16.14.2
node benchmarks/randomU32.js
randomU32(min, max) x 248,233,310 ops/sec ±1.91% (73 runs sampled)
Math.random() * (max - min + 1) + min x 35,034,863 ops/sec ±1.75% (81 runs sampled)
Fastest is randomU32(min, max)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/17 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
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
55 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
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