Skip to content

Commit

Permalink
use includes instead of indexOf
Browse files Browse the repository at this point in the history
  • Loading branch information
lujiajing1126 committed Jan 7, 2019
1 parent 9579011 commit 8bc91b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/buf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8bc91b6

Please sign in to comment.