MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / slugify

Function slugify

src/workspaces/issues/mutate.ts:86–92  ·  view source on GitHub ↗

Derive a stable kebab-case slug from a human title.

(title: string)

Source from the content-addressed store, hash-verified

84
85/** Derive a stable kebab-case slug from a human title. */
86function slugify(title: string): string {
87 return title
88 .toLowerCase()
89 .trim()
90 .replace(/[^a-z0-9]+/g, '-')
91 .replace(/^-+|-+$/g, '')
92}
93
94/** Serialize a frontmatter object + body back into the `---\n…\n---\n\n<body>`
95 * document shape the reader expects. Body is preserved verbatim (trimmed). */

Callers 1

createIssueFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected