1.0.1 • Published 2 years ago

@skeddles/sluggify v1.0.1

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

Sluggify

Takes a string, and turns it into a slug (letters, numbers and dashes only).

This utility doesn't just remove non-matching characters, but tries to find english letter replacements for many accented letters.

Currently only works for node.js, not browsers.

Usage

First, install with

npm i @skeddles/sluggify

Then just require it as a node module. It will return a syncronous function which takes in your input string, and returns the newly made slug.

const sluggify = require('@skeddles/sluggify');
let slug = sluggify('Pokémon Red');
console.log(slug);

Outputs:

pokemon-red
1.0.1

2 years ago

1.0.0

2 years ago