aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/random.ts
blob: 36dde0ccef57da6601d1f65c488c5407a0ceb94c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import {
	NumberDictionary,
	animals,
	colors,
	uniqueNamesGenerator,
} from "unique-names-generator";

export const randomName = () =>
	uniqueNamesGenerator({
		dictionaries: [animals, NumberDictionary.generate({ min: 10, max: 99 })],
		length: 2,
		separator: "",
	});

export const randomPassword = () =>
	uniqueNamesGenerator({
		dictionaries: [colors, NumberDictionary.generate({ min: 100, max: 999 })],
		length: 2,
		separator: "",
	});