MCPcopy
hub / github.com/colinhacks/zod / slugify

Function slugify

packages/zod/src/v4/core/util.ts:347–354  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

345}
346
347export function slugify(input: string): string {
348 return input
349 .toLowerCase()
350 .trim()
351 .replace(/[^\w\s-]/g, "")
352 .replace(/[\s_-]+/g, "-")
353 .replace(/^-+|-+$/g, "");
354}
355
356export const captureStackTrace: (targetObject: object, constructorOpt?: Function) => void = (
357 "captureStackTrace" in Error ? Error.captureStackTrace : (..._args: any[]) => {}

Callers

nothing calls this directly

Calls 2

trimMethod · 0.65
toLowerCaseMethod · 0.65

Tested by

no test coverage detected