UNPKG

slugo

Version:

The smallest possible slug utility for Node.js and Browser

3 lines (2 loc) 493 B
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):e.slugo=o()}(this,function(){"use strict";function e(e){return e.replace(/<(?:.|\n)*?>/gm,"").replace(/[!\"#$%&'\(\)\*\+,\/:;<=>\?\@\[\\\]\^`\{\|\}~]/g,"").replace(/(\s|\.)/g,"-").replace(/-{2,}/g,"-").replace(/—/g,"--").toLowerCase()}return"undefined"!=typeof module&&(module.exports=e,module.exports.default=e),e}); //# sourceMappingURL=slugo.min.js.map