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

ai-from-stream

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ai-from-stream

create an async iterable from a stream

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

ai-from-stream

Travis Build Status NPM downloads

create an async iterable from a stream

This module convert an instance of readable node Stream into an async iterable.

Usage

Write content of a file in a for loop:

import fromStream from ".";
import { createReadStream } from "fs";

const stream = createReadStream(`file.txt`, "utf8");
for await (const chunk of fromStream(stream)) {
  console.log(chunk);
}

This will output the content of file.txt file

API

aiFromStream

Create an async iterable from a stream

Parameters

  • stream ReadableStream the stream to transform

Returns AsyncIterable converted iterator

Install

With npm installed, run

npm install --save ai-from-stream

See Also

License

MIT

FAQs

Package last updated on 28 Nov 2017

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