New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

async-iterable-stream

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-iterable-stream - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

test/test.js

8

index.js
class AsyncIterableStream {
constructor(generatorFactory) {
this.generatorFactory = generatorFactory;
constructor(asyncIteratorFactory) {
this._asyncIteratorFactory = asyncIteratorFactory;
}
next() {
return this.generatorFactory().next();
return this._asyncIteratorFactory().next();
}

@@ -15,3 +15,3 @@

[Symbol.asyncIterator]() {
return this.generatorFactory();
return this._asyncIteratorFactory();
}

@@ -18,0 +18,0 @@ }

{
"name": "async-iterable-stream",
"version": "1.0.1",
"version": "1.0.2",
"description": "A readable async stream which can be iterated over using a for-await-of loop.",
"main": "index.js",
"scripts": {
"test": "./node_modules/mocha/bin/_mocha --reporter spec --timeout 10000 --slow 10000"
},
"repository": {

@@ -7,0 +10,0 @@ "type": "git",

# async-iterable-stream
A readable stream which can be iterated over using a for-await-of loop.
The constructor accepts an `asyncIteratorFactory` as argument; this can be either an async generator function or a regular function which returns an async iterator.
In the case of a generator function, the `asyncIteratorFactory` should yield a sequence of `Promise` objects which resolve one at a time in the same order as they appear in the sequence.
## Installation
```
npm install async-iterable-stream
```
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