mirror of
https://github.com/ThisTine/Snip.git
synced 2026-08-18 23:18:47 +07:00
35 lines
1.3 KiB
TypeScript
35 lines
1.3 KiB
TypeScript
/**
|
||
* Curated word pools for the "easy to remember" mode. Short, concrete,
|
||
* unambiguous words → e.g. "amber-otter-loop". 3 words from these pools gives
|
||
* ~30 × 38 × 30 ≈ 34k base combinations, expanded with a tiny numeric suffix
|
||
* on collision in the real backend.
|
||
*/
|
||
|
||
export const ADJECTIVES = [
|
||
"amber", "brave", "calm", "clever", "cosmic", "crisp", "dawn", "eager",
|
||
"fizzy", "gentle", "happy", "honey", "ivory", "jolly", "keen", "lucky",
|
||
"mellow", "noble", "olive", "plush", "quartz", "rapid", "sunny", "swift",
|
||
"teal", "tidal", "vivid", "warm", "zesty", "zen",
|
||
];
|
||
|
||
export const NOUNS = [
|
||
"otter", "falcon", "maple", "comet", "pixel", "harbor", "meadow", "ember",
|
||
"willow", "lantern", "pebble", "cactus", "marble", "puffin", "ledger",
|
||
"cobra", "violet", "thistle", "acorn", "domino", "compass", "raven",
|
||
"saffron", "juniper", "lotus", "mango", "narwhal", "orchid", "pelican",
|
||
"quokka", "robin", "sparrow", "topaz", "umbra", "walrus", "yarrow", "zephyr",
|
||
];
|
||
|
||
export const VERBS = [
|
||
"loop", "dash", "soar", "drift", "glide", "spark", "leap", "flow",
|
||
"zoom", "hop", "skip", "roam", "bounce", "swirl", "dive", "climb",
|
||
];
|
||
|
||
function pick<T>(arr: T[]): T {
|
||
return arr[Math.floor(Math.random() * arr.length)];
|
||
}
|
||
|
||
export function memorableSlug(): string {
|
||
return `${pick(ADJECTIVES)}-${pick(NOUNS)}-${pick(VERBS)}`;
|
||
}
|