Installations
npm install mnemonic-id
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
14.3.0
NPM Version
6.14.5
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (94.84%)
JavaScript (5.16%)
Developer
Adelost
Download Statistics
Total Downloads
2,788,715
Last Day
14,482
Last Week
49,533
Last Month
302,289
Last Year
2,362,390
GitHub Statistics
11 Stars
43 Commits
3 Forks
2 Watching
20 Branches
1 Contributors
Bundle Size
8.46 kB
Minified
3.68 kB
Minified + Gzipped
Package Meta Information
Latest Version
3.2.7
Package Id
mnemonic-id@3.2.7
Unpacked Size
19.58 kB
Size
7.28 kB
File Count
11
NPM Version
6.14.5
Node Version
14.3.0
Total Downloads
Cumulative downloads
Total Downloads
2,788,715
Last day
-12.8%
14,482
Compared to previous day
Last week
-36.4%
49,533
Compared to previous week
Last month
16.1%
302,289
Compared to previous month
Last year
517.6%
2,362,390
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Mnemonic id
Library to generate easy to remember, and sometimes entertaining, human readable ids.
1createStoryId(); // -> awesome-chipmunk-banish-evil-rat
Partly inspired by Docker name generator and major mnemonic system.
Highlights
- Dictionary of approximate 150 nouns (animals), 200 verbs, 500 adjectives.
- Deterministic id size, with max word length of 10 for nouns, 8 for verbs and adjectives.
- Customizable id generation.
- TypeScript annotated API.
- Slim package size with no dependencies.
Install
1$ npm install mnemonic-id
Usage
Import in either way that suits your environment:
1import { createNameId } from 'mnemonic-id'; 2createNameId();
1import * as mnemonicId from 'mnemonic-id'; 2mnemonicId.createNameId();
1const mnemonicId = require('mnemonic-id'); 2mnemonicId.createNameId();
Then select one of the existing id formats:
1/** "noun", ≈ 10^2 permutations, 10 max length */ 2createNounId(); // -> narwhal 3 4/** "adj+noun", ≈ 10^5 permutations, 19 max length */ 5createNameId(); // -> hungry-hippo 6 7/** "adj+adj+noun", ≈ 10^6 permutations, 28 max length */ 8createLongNameId(); // -> hot-splendid-duck 9 10/** "adj+noun+id", ≈ 10^14 permutations, 26 max length */ 11createUniqueNameId(); // -> dull-dugong-QkCHmf 12 13/** "verb+adj+noun", ≈ 10^6 permutations, 28 max length */ 14createQuestId(); // -> find-pretty-sheep 15 16/** "adj+noun+verb+adj+noun", ≈ 10^12 permutations, 48 max length */ 17createStoryId(); // -> eloquent-beaver-quote-unknown-dinosaur 18 19/** "adj+adj+noun+verb+adj+adj+noun", ≈ 10^17 permutations, 64 max length */ 20createLongStoryId(); // -> wicked-evil-eel-help-horrible-pretty-hamster 21 22/** "number" of given length, length^10 - length^9 permutations */ 23createNumberId(10); // -> 6941634647 (= 10^10-10^9 permutations) 24 25/** "id" of given length, = 40^length permutations */ 26createId(10); // -> uXOGTUiOoD (= 40^10 ≈ 10^16 permutations)
Or customize your own:
1createCustomId({
2 adjectives: 2,
3 subject: true,
4 verb: true,
5 object: true,
6 numberSuffix: 4,
7 idSuffix: 6,
8 delimiter: '_',
9 capitalize: true
10}); // -> Talented_Bold_Pig_Hunt_Brawny_Supreme_Bumblebee_6343_VQ5EAZ
Most existing formats can also be customized:
1createNameId({
2 adjectives: 3,
3 capitalize: true
4 delimiter: '',
5}); // -> OrdinaryCuddlyLaughingSquid
Options
Description of options:
1interface IdOpts { 2 /** Number of adjectives given to object/subject */ 3 adjectives?: number; 4 /** Creates subject in id sentence */ 5 subject?: boolean; 6 /** Creates verb in id sentence */ 7 verb?: boolean; 8 /** Creates object in id sentence */ 9 object?: boolean; 10 /** Creates number of given length at end of id sentence */ 11 numberSuffix?: number; 12 /** Creates id of given length at end of id sentence */ 13 idSuffix?: number; 14 /** Delimiter to be used in id sentence */ 15 delimiter?: string; 16 /** Capitalize each word in sentence */ 17 capitalize?: boolean; 18}
Alternatives
Similar libraries that also exist:
License
Licensed under MIT.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
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
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
45 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2
- Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx
- Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch
- Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94
- Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq
- Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
Score
1.7
/10
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 MoreOther packages similar to mnemonic-id
@rsksmart/rif-id-mnemonic
RIF Identity - mnemonic
rif-id-mnemonic
This package is left empty on purpose for security reasons. If you're looking for an IOVLabs (RSKLabs) related package check [@rsksmart/rif-id-mnemonic](https://www.npmjs.com/package/@rsksmart/rif-id-mnemonic)
@getin-id/bip39
Secure, audited & minimal implementation of BIP39 mnemonic phrases
rerumplaceat
ethereum-hdwallet