mirror of
https://github.com/coder/coder.git
synced 2026-10-13 15:46:46 +08:00
17 lines
368 B
TypeScript
17 lines
368 B
TypeScript
import {
|
|
NumberDictionary,
|
|
animals,
|
|
colors,
|
|
uniqueNamesGenerator,
|
|
} from "unique-names-generator";
|
|
|
|
export const generateWorkspaceName = () => {
|
|
const numberDictionary = NumberDictionary.generate({ min: 0, max: 99 });
|
|
return uniqueNamesGenerator({
|
|
dictionaries: [colors, animals, numberDictionary],
|
|
separator: "-",
|
|
length: 3,
|
|
style: "lowerCase",
|
|
});
|
|
};
|