import { normalizers , kebabCase } from './utils' ; export const normalizeProps = ( props ) => { return Object . keys ( props ) . reduce ( ( acc , curr ) => { return { ... acc , [ kebabCase ( curr ) ] : normalizeProp ( kebabCase ( curr ) , props [ curr ] ) } ; } , { } ) ; } ; const normalizeProp = ( name , value ) => { if ( typeof value === 'undefined' || value === null ) { return undefined ; } return normalizers [ name ] ? normalizers [ name ] ( { name , value } ) : value ; } ;