MCPcopy Create free account
hub / github.com/tiann/hapi / toSlug

Function toSlug

cli/src/runner/worktree.ts:52–58  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

50}
51
52function toSlug(value: string): string {
53 const cleaned = value
54 .toLowerCase()
55 .replace(/[^a-z0-9]+/g, '-')
56 .replace(/^-+|-+$/g, '');
57 return cleaned;
58}
59
60function formatDatePrefix(date: Date = new Date()): string {
61 const month = String(date.getMonth() + 1).padStart(2, '0');

Callers 1

normalizeNameHintFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected