The simplest slugify module in the universe.
npm install skewered> The simplest slugify module in the universe.
Any input character that is not a-z, 0-9 or - will be lowercased or replaced with a hyphen.
* Therefore, use other modifiers beforehand, e.g. diacritics
Resulting values:
* Only contain a-z, 0-9, -
* Do not contain leading or trailing hyphens
* Do not contain repeating hyphens
``sh`
$ npm install skewered
`js
const skewered = require("skewered");
const before =
"- (this),is.a+test-thatmust:work;or&else#it%fails big//time 1'2'3 123--xyz----Möbius _";
const after =
"this-is-a-test-that-must-work-or-else-it-fails-big-time-1-2-3-123-xyz-m-bius";
console.log(skewered(before) === after);
//=> true
``
ISC © Buster Collings
[npm-image]: https://badge.fury.io/js/skewered.svg
[npm-url]: https://npmjs.org/package/skewered
[travis-image]: https://travis-ci.org/busterc/skewered.svg?branch=master
[travis-url]: https://travis-ci.org/busterc/skewered
[daviddm-image]: https://david-dm.org/busterc/skewered.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/busterc/skewered
[coveralls-image]: https://coveralls.io/repos/busterc/skewered/badge.svg
[coveralls-url]: https://coveralls.io/r/busterc/skewered