Text Search in Node.JS Streams
This micro-library (no dependencies) searches for occurrences of a given search
term (string or Regex) in a Node.js stream, i.e. anything that emits
events with Buffers or strings.
const streamSearch = myStream// wait until myStream contains "hello"await streamSearch// capture data from the streamconst matchText = await streamSearch// matchingText contains something like "listening at port 3000."// access the captured stream contentconst text = streamSearch
- StreamSnitch: does the same thing with regular expressions, but is buggy and blocks the event queue
All contributions and feedback, no matter how big or small, is welcome. Please submit bugs, ideas, or improvements via an issue or pull request.
- run all tests:
- run unit tests:
- run linters:
- fix formatting issues:
- see all available make commands:
Deploy a new version
- update the version in
package.jsonand commit to