Skip to content

Commit

Permalink
chore: only assign at constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Sep 13, 2024
1 parent b5e4500 commit 90fa280
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const bufferCompare = (buffer1, offset1, buffer2, offset2, length) => {
};

export const Match = class {
#matches = 0;
#lookbehindSize = 0;
#matches;
#lookbehindSize;
#lookbehind;
#skip;
#pattern;
Expand Down Expand Up @@ -52,6 +52,8 @@ export const Match = class {
this.#pattern = this.#from(pattern);
this.#skip = Match.#table(this.#pattern);
this.#lookbehind = new Uint8Array(this.#pattern.length - 1);
this.#lookbehindSize = 0;
this.#matches = 0;
}

get matches() {
Expand Down

0 comments on commit 90fa280

Please sign in to comment.