index.js 276 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 function omit(obj, fields) { // eslint-disable-next-line prefer-object-spread var shallowCopy = Object.assign({}, obj); for (var i = 0; i < fields.length; i += 1) { var key = fields[i]; delete shallowCopy[key]; } return shallowCopy; } export default omit;