Skip to content

Commit

Permalink
Finish: remove includes usage
Browse files Browse the repository at this point in the history
  • Loading branch information
leftstick committed Apr 4, 2018
1 parent 05c1772 commit fe0c362
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/helpers/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function isFunction(obj: any): obj is boolean {

export function omit<T>(obj: T, ...keys: Array<string>): T {
const rawKeys = Object.keys(obj)
const finalKeys = rawKeys.filter(k => !keys.includes(k))
const finalKeys = rawKeys.filter(k => keys.indexOf(k) < 0)
return finalKeys.reduce(
(p, v) => {
p[v] = obj[v]
Expand Down

0 comments on commit fe0c362

Please sign in to comment.