Files
pichunt/shared/utils/name.ts
T
2025-08-04 20:23:19 +02:00

21 lines
417 B
TypeScript

import {
adjectives,
animals,
colors,
type Config,
uniqueNamesGenerator
} from 'unique-names-generator';
const nameConfig: Config = {
dictionaries: [adjectives, colors, animals],
separator: ' ',
style: 'capital'
};
export function getRandomName() {
return uniqueNamesGenerator(nameConfig);
}
export function getRandomUsername() {
return uniqueNamesGenerator({ ...nameConfig, separator: '' });
}