Socket
Socket
Sign inDemoInstall

@caldwell619/github-slugger

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @caldwell619/github-slugger

Fork of github-slugger written in TS


Version published
Weekly downloads
63
increased by50%
Maintainers
1
Install size
73.5 kB
Created
Weekly downloads
 

Readme

Source

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'

FAQs

Last updated on 19 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc