Skip to content

JsCommunity/partial-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

partial-stream Build Status

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

# Install dependencies
> npm install

# Run the tests
> npm test

# Continuously compile
> npm run dev

# Continuously run the tests
> npm run dev-test

# Build for production (automatically called by npm install)
> npm run build

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

ISC © Julien Fontanet

About

Extract the first part of a stream based on a separator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •