From fe0c3627dcd32f691a7ebadf1073e7670cd47ad5 Mon Sep 17 00:00:00 2001 From: "Howard.Zuo" Date: Wed, 4 Apr 2018 21:00:16 +0800 Subject: [PATCH] Finish: remove includes usage --- lib/helpers/object.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helpers/object.ts b/lib/helpers/object.ts index 5204d3c..a3a207a 100755 --- a/lib/helpers/object.ts +++ b/lib/helpers/object.ts @@ -16,7 +16,7 @@ export function isFunction(obj: any): obj is boolean { export function omit(obj: T, ...keys: Array): 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]