Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/gfm/deps.ts>GitHubSlugger#slug

Server-side GitHub Flavored Markdown rendering for Deno
Go to Latest
method GitHubSlugger.prototype.slug
import { GitHubSlugger } from "https://deno.land/x/gfm@0.3.0/deps.ts";

Generate a unique slug.

Tracks previously generated slugs: repeated calls with the same value will result in different slugs. Use the slug function to get same slugs.

Parameters

value: string

String of text to slugify

optional
maintainCase: boolean | undefined

Keep the current case, otherwise make all lowercase

Returns

string

A unique slug string