function snek(str) {
  let o = '';
  for (let i = 0, len = str.length; i < len; i++) {
    const c = str[i].toLowerCase();
    if (c === str[i]) o += c;
    else o += '-' + c;
  }
  return o;
}
// converts camelCase to snake-case
converts camelCase to snake-case
converts camelCase to snake - case
function snek(str) {
  let o = '';
  for (let i = 0, len = str.length; i < len; i++) {
    const c = str[i].toLowerCase();
    if (c === str[i]) o += c;
    else o += '-' + c;
  }
  return o;
}
function snek ( str ) { let o = '' ; for ( let i = 0 , len = str . length ; i < len ; i ++ ) { const c = str [ i ] . toLowerCase ( ) ; if ( c === str [ i ] ) o += c ; else o += '-' + c ; } return o ; }
converts camelCase to snake-case
converts camelCase to snake - case