https://github.com/mtso/faster-word-id
https://github.com/mtso/faster-word-id
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mtso/faster-word-id
- Owner: mtso
- Created: 2021-05-07T15:04:34.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-28T05:49:15.000Z (over 4 years ago)
- Last Synced: 2025-10-20T16:58:56.595Z (3 months ago)
- Language: TypeScript
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# faster-word-id
Faster, simpler generator of random ID strings composed of words (than `word-id`).
The default word list guarantees word segment lengths between 4 and 7.
## Usage
```js
const generateWordId = require('faster-word-id')
const wordId = generateWordId({
wordCount: 2, // default 2
join: '-', // default '-'
// wordList: [...], default dictionary contains 1525 words of length 4-7.
})
console.log(wordId) // e.g. 'choose-smile'
```