util.js 217 B

12345678
  1. const came = str => `${str}`.replace(/-\D/g, match => match.charAt(1).toUpperCase())
  2. const hyphenate = str => `${str}`.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`)
  3. module.exports = {
  4. came,
  5. hyphenate,
  6. }