export const cloneDeep = obj => { const copy = Object . create ( Object . getPrototypeOf ( obj ) ) ; const propNames = Object . getOwnPropertyNames ( obj ) ; propNames . forEach ( name => { const desc = Object . getOwnPropertyDescriptor ( obj , name ) ; Object . defineProperty ( copy , name , desc ) ; } ) ; return copy ; } ; export const isEmpty = obj => { return Object . keys ( obj ) . length === 0 ; } ; export const filterEmptyObj = obj => { for ( const key in obj ) { if ( obj [ key ] === '' ) { delete obj [ key ] ; } } return obj ; } ; export const setFontSizeStr = fontSize => { return fontSize . includes ( 'px' ) ? fontSize : `${ fontSize }px` ; } ;