From 8bc91b694ebc2b95d2c4e2c7ab4a7e554bacc8bc Mon Sep 17 00:00:00 2001 From: megrez Date: Mon, 7 Jan 2019 10:19:33 +0100 Subject: [PATCH] use includes instead of indexOf --- lib/buf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/buf.js b/lib/buf.js index 8625849..55f39c8 100644 --- a/lib/buf.js +++ b/lib/buf.js @@ -7,7 +7,7 @@ class InputBuffer { } _replace() { - if (this._buf.indexOf(BACK_SLASH) < 0) { + if (!this._buf.includes(BACK_SLASH)) { return; } let len = this._buf.length;