New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

sluggr

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sluggr

JS light slugger

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

sluggr

JS light slugger 875 B (gzipped: 495 B)

How to use

const sluggr = require('sluggr');

// sluggr(char = "_", whitelist = "", shouldNormalize = true)
const slugger = sluggr("-", ":;");

> slugger("WDAè: ô*")
"wdae:-o"

shouldNormalize

If shouldNormalize is set to false, sluggr will no longer replace é by e etc. and those characters will be considered as whitespaces, so you'll have to set them in the whitelist string

const sluggr = require('sluggr');

const slugger = sluggr("-", "ô", false);

> slugger("WDAè: ô*")
"wda:-ô"

Keywords

js

FAQs

Package last updated on 27 Jun 2018

Did you know?

Socket

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