You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,9 +32,9 @@ new Match(pattern, callback);
32
32
newMatch(pattern, callback, Buffer.from);
33
33
```
34
34
35
-
-`pattern` (string): The pattern to search for. Must be between 1 and 256 characters long.
36
-
-`callback` (function): The function to be called when there's a match or when a chunk of data is processed.
37
-
-`from` (function, optional): The native or custom`Buffer.from` implementation for runtimes like Node.js. Defaults to an internal, browser-compatible function.
35
+
-`pattern` (Uint8Array|string): The pattern to search for. Must be between 1 and 256 characters long.
36
+
-`callback` (Function): The function to be called when there's a match or when a chunk of data is processed.
37
+
-`from` (Function, optional): Custom`Buffer.from` implementation for runtimes like Node.js. Defaults to an internal, browser-compatible function.
38
38
39
39
The constructor may throw:
40
40
@@ -50,7 +50,7 @@ The constructor may throw:
50
50
51
51
-`destroy()`: Calls the callback with any remaining lookbehind data and calls `reset()`.
52
52
-`reset()`: Resets the internal state.
53
-
-`write(chunk)`: Feeds a chunk of data.
53
+
-`write(chunk: Uint8Array|string)`: Feeds a chunk of data.
0 commit comments