export const atomGenerator = ( property , value ) => ( { [ property ] : value , } ) ; export const camelCaseSplit = ( string ) : [ string , string ] => { const [ key , ... value ] = string . replace ( '_' , '-' ) . split ( /(?=[-A-Z0-9])/ ) ; const v = value . join ( '' ) . toLowerCase ( ) ; return [ key . toLowerCase ( ) , v ] ; } ; export const capitalize = ( s ) => s . charAt ( 0 ) . toUpperCase ( ) + s . slice ( 1 ) . toLowerCase ( ) ; export const isEmpty = ( val ) => val == null || ! Object . keys ( val ) . length ; export const warnOnInvalidKey = ( message ) => __DEV__ && console . warn ( message ) ;