From f5066597bf65d2a484d41bac9ec78242382e5bdd Mon Sep 17 00:00:00 2001 From: webmech Date: Tue, 23 Oct 2018 16:43:08 -0400 Subject: [PATCH] refactor(*): substitute use of bitwise operator in favor of array includes --- lib/badwords.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/badwords.js b/lib/badwords.js index 4da86ad..a02d0d4 100644 --- a/lib/badwords.js +++ b/lib/badwords.js @@ -66,7 +66,7 @@ class Filter { this.list.push(...words); words.forEach((word) => { - if (!!~this.exclude.indexOf(word)) { + if (this.exclude.includes(word)) { this.exclude.splice(this.exclude.indexOf(word), 1); } });