MCPcopy
hub / github.com/upstash/jstack / slugify

Function slugify

www/src/lib/utils.ts:16–26  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

14}
15
16export function slugify(text: string) {
17 return text
18 .toString()
19 .toLowerCase()
20 .normalize(`NFD`)
21 .trim()
22 .replace(/\./g, ``)
23 .replace(/\s+/g, `-`)
24 .replace(/[^\w-]+/g, ``)
25 .replace(/--+/g, `-`)
26}
27
28export function constructMetadata({
29 title = "JStack - Full-Stack Next.js & TypeScript Toolkit",

Callers 4

TableOfContentsFunction · 0.90
PageFunction · 0.90
indexDocsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected