combined-slugify
v2.1.0
Published
Combine multiple slugifiers to get a better result
Downloads
1,389
Readme
Combined Slugify
This module creates a slug by utilizing 2 other libraries.
- node-slug for transforming utf8 symbols
- node-transliteration for transliterating special language characters like arabic, chinese, cyrillic...
Install
npm install combined-slugify
Usage
Example
var slugify = require('combined-slugify');
slugify('i ♥ unicode');
// > i-love-unicode
slugify('你好,世界');
// > ni-hao-shi-jie
Node slug supports multiple configurations options which you can pass into combined-slugify. see node-slug for details
Example
var slugify = require('combined-slugify', {lower: false});
slugify('Haus & Garten');
// > Haus-and-Garten
slugify('Haus & Garten', {lower: true});
// > haus-and-garten
Changelog
2.0.1
- add lower: true as default param
2.0.0
- default mode for node-slug is pretty
- added support to specify node-slug options
1.x.x
- default mode for node-slug is rfc3986
Running Tests
npm test