[offers][feat] add random name generator

pull/422/head
Stuart Long Chay Boon 2 years ago
parent 65a8618e54
commit ef5892a0d6

@ -38,6 +38,7 @@
"react-popper-tooltip": "^4.4.2", "react-popper-tooltip": "^4.4.2",
"react-query": "^3.39.2", "react-query": "^3.39.2",
"superjson": "^1.10.0", "superjson": "^1.10.0",
"unique-names-generator": "^4.7.1",
"zod": "^3.18.0" "zod": "^3.18.0"
}, },
"devDependencies": { "devDependencies": {

@ -0,0 +1,13 @@
import type { Config } from 'unique-names-generator';
import { adjectives, animals,colors, uniqueNamesGenerator } from 'unique-names-generator';
const customConfig: Config = {
dictionaries: [adjectives, colors, animals],
length: 3,
separator: '-',
};
export default function generateRandomName(): string {
return uniqueNamesGenerator(customConfig)
}

@ -14405,6 +14405,11 @@ unique-filename@^1.1.1:
dependencies: dependencies:
unique-slug "^2.0.0" unique-slug "^2.0.0"
unique-names-generator@^4.7.1:
version "4.7.1"
resolved "https://registry.yarnpkg.com/unique-names-generator/-/unique-names-generator-4.7.1.tgz#966407b12ba97f618928f77322cfac8c80df5597"
integrity sha512-lMx9dX+KRmG8sq6gulYYpKWZc9RlGsgBR6aoO8Qsm3qvkSJ+3rAymr+TnV8EDMrIrwuFJ4kruzMWM/OpYzPoow==
unique-slug@^2.0.0: unique-slug@^2.0.0:
version "2.0.2" version "2.0.2"
resolved "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz" resolved "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz"

Loading…
Cancel
Save