slug-web-friendly
v0.2.0
Published
Out of the box slugify method
Downloads
12
Maintainers
Readme
Slug-web-friendly
npm i slug-web-friendly
import slugify from 'slug-web-friendly';
slugify('some string'); // some-string
![npm-version] ![coveralls-status]
"Simple Slugify"
is a JavaScript library that allows you to convert any string into a URL-friendly format, by replacing spaces with a chosen separator character. For example, you can turn "some string" into "some-string". The library is written in ES2015 JavaScript and has no dependencies.
The library can also convert foreign symbols into their English equivalents, based on a predefined mapping of characters. Additionally, it can work in the browser as well as with AMD/CommonJS module loaders.