(obj, omitKeys)
| 62 | * Returns a new object with the key/value pairs from `obj` that are not in the array `omitKeys`. |
| 63 | */ |
| 64 | export function omit(obj, omitKeys) { |
| 65 | const result = {}; |
| 66 | Object.keys(obj).forEach((key) => { |
| 67 | if (omitKeys.indexOf(key) === -1) { |
| 68 | result[key] = obj[key]; |
| 69 | } |
| 70 | }); |
| 71 | return result; |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * Returns a filtered copy of an object with only the specified keys. |
no outgoing calls
no test coverage detected
searching dependent graphs…