slug-generator
v1.0.6
Published
Create URI slug in easy way. Supports serbian cyrilic and latin language.
Downloads
130
Maintainers
Readme
slug-generator
This is vanilla javascript port of node-slug so all credits goes to dodo and simov.
This script convert cyrilic to latin URI slug.
var slugify = require('slug-generator')
// add string to a function to create slug
slugify('this is a string') // returns this-is-a-string
// if you want to change default separator(-) add 2nd parameter to function
slugify('this is a string', '_') //returns this_is_a_string