random-word
Version:
Get a random English word
28 lines (17 loc) • 469 B
Markdown
# random-word
> Get a random English word
## Install
```sh
npm install random-word
```
## Usage
```js
import randomWord from 'random-word';
randomWord();
//=> 'ferriferous'
randomWord();
//=> 'microfloppies'
```
The [underlying list of words](https://github.com/sindresorhus/word-list/blob/main/words.txt) is a 2.7 MB text file with 274,925 English words.
## Related
- [random-word-cli](https://github.com/sindresorhus/random-word-cli) - CLI for this package