@caldwell619/github-slugger
v0.0.3
Published
Fork of github-slugger written in TS
Downloads
155
Readme
GitHub Slugger
Fork of github-slugger written in TS
Demo
Getting Started
yarn add @caldwell619/github-slugger
Quick Example
import { slugger } from '@caldwell619/github-slugger'
const slug = slugger('My Cool Post: 2000-08-02')
// my-cool-post-2000-08-02
Maintaining Casing
By default, all characters will be lower cased. If you wish to maintain the casing, pass the second argument as true:
import { slugger } from '@caldwell619/github-slugger'
const slug = slugger('My Cool Post: 2000-08-02', true)
// 'My-Cool-Post-2000-08-02'