import { isString } from './inspect' ; const camelCaseRegex = /([a-z])[- ]([a-z])/gi ; function camelCaseReplacer ( _ , p1 , p2 ) { return p1 + p2 . toUpperCase ( ) ; } export function toCamelCase ( value ) { return isString ( value ) ? ( value as string ) . replace ( camelCaseRegex , camelCaseReplacer ) : '' ; } export function hyphenate ( value ) { return value . replace ( /([A-Z])/g , match => `-` + match [ 0 ] . toLowerCase ( ) ) ; } export function csvToList ( data ) { return data . split ( ',' ) ; }