export function isObject ( value ) { const type = typeof value ; return value !== null && ( type === 'object' || type === 'function' ) ; } export function omit ( source , ... fields ) { let result = { } ; if ( isObject ( source ) ) { result = Object . assign ( result , source ) ; fields . forEach ( field => delete result [ field ] ) ; } return result ; }