slugify
slugify(str: string): stringSource: 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)