import { objType } from '../store/common/type' ; function deepCopy ( obj ) { if ( obj === null || typeof obj !== 'object' ) { return obj ; } const result = Array . isArray ( obj ) ? [ ] : { } ; Object . keys ( obj ) . forEach ( ( key ) => { result [ key ] = deepCopy ( obj [ key ] ) ; } ) ; return result ; } export default deepCopy ;