MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / slugify

Function slugify

packages/plugins/toolkits/src/server.ts:91–97  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

89const slugPattern = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
90
91const slugify = (name: string): string =>
92 name
93 .trim()
94 .toLowerCase()
95 .replace(/[^a-z0-9]+/g, "-")
96 .replace(/^-+|-+$/g, "")
97 .slice(0, 63);
98
99const normalizeSlugEffect = (input: {
100 readonly name: string;

Callers 1

normalizeSlugEffectFunction · 0.70

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected