@nanpx/slugify
v1.0.1
Published
Lightweight, no frills string slugifier.
Downloads
6
Maintainers
Readme
slugify
Install
npm install @nanpx/slugify
Use
(() => {
'use strict';
const Slugify = require('@nanpx/slugify');
const title = 'Page Title';
const slug = Slugify.parseSync(title);
console.log(slug); // 'page-title'
// or promise version
Slugify.parse(title)
.then((slug) => console.log(slug)); // 'page-title'
})();