🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

async-chunks

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-chunks

Get an async iterator over chunks in a stream.

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
64
3100%
Maintainers
1
Weekly downloads
 
Created
Source

Async Chunks

Get an async iterator over chunks in a stream.

Installation

npm install --save async-chunks

Usage

const fs = require('fs')
const asyncChunks = require('async-chunks')

// Print current file to stdout
const stream = fs.createReadStream(__filename)

for await (const chunk of asyncChunks(stream)) {
  process.stdout.write(chunk)
}

API

asyncChunks(stream: Readable) => AsyncIterableIterator<string | Buffer>

Returns a new async iterator that iterates over all the chunks in the stream.

FAQs

Package last updated on 29 May 2018

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