Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

async-concat-stream

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-concat-stream

Asynchronous concat-stream. Writable stream that concatenates string or binary data and returns a promise that resolves with the result.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

async-concat-stream

Asynchronous concat-stream. Writable stream that concatenates string or binary data and returns a promise that resolves with the result.

npm Build Status devDependency Status node

Usage

const concat = require('async-concat-stream')

concat(opts = {})

Creates a writable concat-stream. The promise property of the returned stream will be resolved when all of the data has been written to the stream.

Parameters:

  • opts - concat-stream options

Returns: Writable - writable stream from concat-stream with promise property

Usage:

let writable = concat()
readable.pipe(writable)
let data = await writable.promise // via ES7 async

concat.from(readable, opts = {})

Convenience method to read from the specified readable stream. Also handles errors from the readable stream.

Parameters:

  • readable - Readable, The readable stream
  • opts - concat-stream options Returns: Promise - resolves with the data from concat-stream

Usage:

let data = await concat.from(readable) // via ES7 async

Why make this when there are ~2 others?

I like to avoid promise modules and unnecessarily adding stuff to and hybridizing promises.

License

MIT

Keywords

FAQs

Package last updated on 19 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc