function snakeCase(str) {
  return str
    .replace(/\B([A-Z])/gu, '_$1')
    .replace(/-/gu, '_')
    .toLowerCase()
}
Convert text to snake_case
@param {string} str Text to be converted
@return {string}