partial-stream
v0.0.0
Published
Extract the first part of a stream based on a separator
Downloads
2,270
Readme
partial-stream
Extract the first part of a stream based on a separator
Install
Installation of the npm package:
> npm install --save partial-stream
Usage
In this example, the header section of an HTTP response is extracted from the raw response.
import partialStream from 'partial-stream'
const contentStream = rawHttpResponse
.pipe(partialStream('\r\n\r\n', headers => {
console.log(headers)
})
contentStream.pipe(writeStream)
Development
Installing dependencies
> npm install
Compilation
The sources files are watched and automatically recompiled on changes.
> npm run dev
Tests
> npm run test-dev
Contributions
Contributions are very welcomed, either on the documentation or on the code.
You may:
- report any issue you've encountered;
- fork and create a pull request.
License
${pkg.license} © Julien Fontanet