src/components/scenegraph/Toolbar.js
/**
 * Slugify the string removing non-word chars and spaces
 * @param  {string} text String to slugify
 * @return {string}      Slugified string
 */
Slugify the string removing non-word chars and spaces
@param  {string} text String to slugify
@return {string}      Slugified string
Slugify the string removing non - word chars and spaces @param { string } text String to slugify @return { string } Slugified string
function slugify (text) {
  return text
    .toString()
    .toLowerCase()
    .replace(/\s+/g, '-') 
    .replace(/[^\w\-]+/g, '-') 
    .replace(/\-\-+/g, '-') 
    .replace(/^-+/, '') 
    .replace(/-+$/, ''); 
}
function slugify ( text ) { return text . toString ( ) . toLowerCase ( ) . replace ( / \s+ / g , '-' ) . replace ( / [^\w\-]+ / g , '-' ) . replace ( / \-\-+ / g , '-' ) . replace ( / ^-+ / , '' ) . replace ( / -+$ / , '' ) ; }
Slugify the string removing non-word chars and spaces
 @param  {string} text String to slugify
 @return {string}      Slugified string
Slugify the string removing non - word chars and spaces @param { string } text String to slugify @return { string } Slugified string
// Replace spaces with - // Replace all non-word chars with - // Replace multiple - with single - // Trim - from start of text // Trim - from end of text