function camelCaseToDash(str) {
    return str.replace(/([a-zA-Z])(?=[A-Z])/g, '$1-')
        .toLowerCase();
}
convert camelcase to dash

borrow from https://gist.github.com/youssman/745578062609e8acac9f

@param {string} str string in camel case
@return {string} dash string