export const capitalCase = string => {
  return string
    .replace(/\s|\//g, ' ')
    .split(' ')
    .map(part => {
      return part.charAt(0).toUpperCase() + part.substring(1).toLowerCase()
    })
    .join('')
}

export const kebabCase = string => {
  let value = string.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)
  return (Array.isArray(value) && value.map(x => x.toLowerCase()).join('-')) || string
}
