mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-04 10:05:53 +02:00
Use niceId
This commit is contained in:
parent
ff47ba0b77
commit
c47d7fb1ff
15 changed files with 62 additions and 55 deletions
|
@ -12,7 +12,7 @@ export const names = JSON.parse(readFileSync(file, 'utf-8'));
|
|||
|
||||
export function getUniqueName(): string {
|
||||
return (
|
||||
names.animals[Math.floor(Math.random() * names.animals.length)] +
|
||||
names.descriptor[Math.floor(Math.random() * names.descriptor.length)]
|
||||
).toLowerCase();
|
||||
names.descriptors[Math.floor(Math.random() * names.descriptors.length)] + "-" +
|
||||
names.animals[Math.floor(Math.random() * names.animals.length)]
|
||||
).toLowerCase().replace(/\s/g, '-');
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue