MCPcopy Index your code
hub / github.com/dmno-dev/bumpy / randomName

Function randomName

packages/bumpy/src/utils/names.ts:2–5  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1/** Generate a random adjective-noun name for bump files */
2export function randomName(): string {
3 const pick = <T>(arr: T[]) => arr[Math.floor(Math.random() * arr.length)]!;
4 return `${pick(ADJECTIVES)}-${pick(ADJECTIVES)}-${pick(NOUNS)}`;
5}
6
7/** Sanitize a user-provided name into a valid filename slug */
8export function slugify(name: string): string {

Callers 5

names.test.tsFile · 0.90
generateCommandFunction · 0.90
addCommandFunction · 0.90
buildAddBumpFileLinkFunction · 0.90

Calls 1

pickFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…