blob: beb09f6ad999072726764478807bd870a2a587ca [file] [log] [blame] [edit]
export function dissoc(prop, obj){
if (arguments.length === 1) return _obj => dissoc(prop, _obj)
if (obj === null || obj === undefined) return {}
const willReturn = {}
for (const p in obj){
willReturn[ p ] = obj[ p ]
}
delete willReturn[ prop ]
return willReturn
}