aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/random.ts
blob: 4c8dbda3af0d5db303043f8a55aa213e295c2c72 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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: "",
  });