https://github.com/ad-si/streamtester
A writable stream which can perform specified tests on the written data
https://github.com/ad-si/streamtester
Last synced: 6 months ago
JSON representation
A writable stream which can perform specified tests on the written data
- Host: GitHub
- URL: https://github.com/ad-si/streamtester
- Owner: ad-si
- Created: 2015-07-08T13:56:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-24T08:23:12.000Z (about 9 years ago)
- Last Synced: 2025-03-10T14:43:50.913Z (7 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# StreamTester
A writable stream which can perform specified tests on the written data
## Installation
```shell
npm install --save-dev streamtester
```## Usage
```js
const fs = require('fs')
const packageStream = fs.createReadStream('./package.json')
const StreamTester = require('streamtester')
const streamTester = new StreamTester({
test: (chunk) =>
console.assert(JSON.parse(chunk.toString()).name === 'streamtester')
})packageStream.pipe(streamTester)
```