@caldwell619/github-slugger
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

GitHub Slugger

Fork of github-slugger written in TS

NPM NPM

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'

Dependencies (0)

    Dev Dependencies (14)

    Package Sidebar

    Install

    npm i @caldwell619/github-slugger

    Weekly Downloads

    32

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    75.3 kB

    Total Files

    15

    Last publish

    Collaborators

    • caldwell619