npm.io
1.0.6 • Published 9 years ago

slug-generator

Licence
MIT
Version
1.0.6
Deps
0
Vulns
0
Weekly
0
Stars
1

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

Keywords