r8s-cli
Version:
A command line tool for Reaction Commerce to be used with kubernetes
15 lines (13 loc) • 399 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.slugify = slugify;
/**
* slugify a string
* @param {String} str string to slugify
* @return {String} slugified string
*/
function slugify(str) {
return str.toString().trim().toLowerCase().replace(/\s+/g, '-').replace(/[^\w\-]+/g, '').replace(/\-\-+/g, '-').replace(/^-+/, '').replace(/-+$/, '');
}
;