0.0.2-1 • Published 3 years ago
@gear4s/random-words v0.0.2-1
Random Words!
Generate some random words, with a sane API
How do I use it?
To generate a random-ass, normal word, you can just import and call this function:
import GenerateRandomWord from "@gear4s/random-words";
const RandomWords = GenerateRandomWord();
You can also generate words that start with a letter:
import GenerateRandomWord from "@gear4s/random-words";
const startingLetter = "a";
const RandomWords = GenerateRandomWord(startingLetter);
Or generate words with a maximum length:
import GenerateRandomWord from "@gear4s/random-words";
const RandomWords = GenerateRandomWord(null, 6);
You can also generate more than one word at a time:
import GenerateRandomWord from "@gear4s/random-words";
const RandomWords = GenerateRandomWord(null, null, 15);
Argument list
- letter
- type: string
- default: null
- maxLength
- type: number
- min: 1
- default: null
- count
- type: number
- min: 1
- default: null