0.0.3 • Published 2 years ago

@caldwell619/github-slugger v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

GitHub Slugger

Fork of github-slugger written in TS

NPM NPM npm.io npm.io

Demo

GH Pages

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'