jBeliar
2/1/2018 - 5:16 PM

String utils javascript ES6

String utils javascript ES6

const kebabCase = string => str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()
const firstCharUpperCase = ([first, ...rest]) => first.toUpperCase() + rest.join('').toLowerCase()