clean-jsdoc-theme TypeDoc APIv0.0.0

slugify

slugify(str: string): string

Source: string.ts:262

Generates a slug from a string

Parameters

  • str (string) — The input string

Returns

  • string — URL-safe slug

Example

CODE
slugify('Hello World!') // 'hello-world'
slugify('TypeScript & JavaScript') // 'typescript-and-javascript'
slugify('你好世界') // '' (non-ASCII removed)