Gathering detailed insights and metrics for tech-human-id
Gathering detailed insights and metrics for tech-human-id
Gathering detailed insights and metrics for tech-human-id
Gathering detailed insights and metrics for tech-human-id
💃🆔 Generates human readable identifier strings by chaning common (short) words of the english language.
npm install tech-human-id
Typescript
Module System
74.8
Supply Chain
99.4
Quality
89.3
Maintenance
100
Vulnerability
100
License
TypeScript (96.13%)
JavaScript (3.87%)
Total Downloads
523
Last Day
7
Last Week
18
Last Month
523
Last Year
523
1 Stars
88 Commits
4 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
5.0.7
Package Id
tech-human-id@5.0.7
Unpacked Size
111.35 kB
Size
16.88 kB
File Count
43
Publised On
11 Jan 2025
Cumulative downloads
Total Downloads
Last day
0%
7
Compared to previous day
Last week
28.6%
18
Compared to previous week
Last month
0%
523
Compared to previous month
Last year
0%
523
Compared to previous year
20
NOTE: This is a fork from https://github.com/RienNeVaPlus/human-id
This includes tech terms only. Check the examples below.
Using words to identify datasets (instead of numbers) provides various advantages when humans are involved, ie increased distinction and rememberability.
Human-ID generates readable strings by chaining common short words of the english language in a semi-meaningful way.
The result is concatenated of adjective + noun + verb
resulting in a minimum pool size of 28
690 200 possible combinations.
1import { humanId } from "tech-human-id";
1humanId();
1humanId("-"); // or { "separator": "-" }
1humanId(false); // or { "capitalize": false }
Yarn
yarn add tech-human-id
NPM
npm install tech-human-id
1// ES6+ 2import { humanId, poolSize, minLength, maxLength } from "tech-human-id"; 3 4// CommonJS 5// const { humanId, poolSize, minLength, maxLength } = require("tech-human-id"); 6 7// LightStructuresCreate 8console.log(humanId()); 9 10// Tough~Frameworks~Export 11// alias for { separator: '~' } 12console.log(humanId("~")); 13 14// shiny-machines-integrate 15console.log( 16 humanId({ 17 separator: "-", 18 capitalize: false, 19 }), 20); 21 22console.log(poolSize()); // 4,34,700 23console.log(minLength()); // 10 24console.log(maxLength()); // 28
For most cases, the default pool size should be large enough. However, the options adjectiveCount
and addAdverb
can be utilized to increase the pool size for the price of the string length.
1const options = { 2 adjectiveCount: 2, 3 addAdverb: true, 4 separator: ".", 5}; 6 7console.log(humanId(options)); // Fast.Fast.Queues.Compile.Optimally 8console.log(poolSize(options)); // 28,690,200 9console.log(minLength(options)); // 24 10console.log(maxLength(options)); // 54
humanId(options?: string | Option): string
Generates a human ID. Options can be a string
(separator), a boolean
(capitalize) or an Options
object of:
string = ''
- Separates the words from each otherboolean = true
- Whether to transform the first character of each word to upper casenumber = 1
- How many adjectives to returnboolean = false
- Adds a fourth part to the idThis function is also available as the default export
poolSize(options?: string | Option): number
Returns the number of possible combinations for a given set of options.
minLength(options?: Option): number
The length of the shortest possible id for a given set of options.
maxLength(options?: Option): number
The length of the longest possible id for a given set of options.
adjectives: string[]
List of possible values for the first part of the human id.
nouns: string[]
List of possible values for the second part of the human id.
verbs: string[]
List of possible values for the third part of the human id.
adverbs: string[]
List of possible values for the optional fourth part of the human id.
No vulnerabilities found.
No security vulnerabilities found.