UNPKG

rizzo-next

Version:

The next generation of Lonely Planet's style guide and pattern library.

17 lines (14 loc) 392 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Takes a given string and turns it into a hyphenated slug * @param {String} string String to replace * @return {String} */ var slugify = function slugify(string) { if (!string || typeof string !== "string") return ""; return string.toLowerCase().replace(/\s/g, "-"); }; exports.slugify = slugify;