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

asynciterator-promiseproxy

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asynciterator-promiseproxy - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

1

lib/PromiseProxyIterator.d.ts

@@ -11,3 +11,4 @@ import { AsyncIterator, TransformIterator, TransformIteratorOptions } from "asynciterator";

constructor(sourceGetter: () => Promise<AsyncIterator<T>>, options?: TransformIteratorOptions<T>);
loadSource(): Promise<AsyncIterator<T>>;
_read(count: number, done: () => void): void;
}

9

lib/PromiseProxyIterator.js

@@ -15,6 +15,11 @@ "use strict";

}
async loadSource() {
if (!this.source) {
this.source = await this.sourceGetter();
}
return this.source;
}
_read(count, done) {
if (!this.source) {
this.sourceGetter().then((source) => {
this.source = source;
this.loadSource().then((source) => {
super._read(count, done);

@@ -21,0 +26,0 @@ }).catch((error) => this.emit('error', error));

{
"name": "asynciterator-promiseproxy",
"version": "2.0.0",
"version": "2.1.0",
"description": "An AsyncIterator proxy that allows its source to be set via a promise.",

@@ -30,10 +30,10 @@ "main": "index.js",

"@types/asynciterator": "^1.1.1",
"@types/jest": "^21.1.8",
"@types/jest": "^24.0.1",
"coveralls": "^3.0.0",
"jest": "^21.2.1",
"jest": "^23.4.1",
"pre-commit": "^1.2.2",
"ts-jest": "^21.2.3",
"ts-jest": "^24.0.0",
"tslint": "^5.8.0",
"tslint-eslint-rules": "^4.1.1",
"typescript": "^2.6.2"
"tslint-eslint-rules": "^5.3.1",
"typescript": "^3.0.3"
},

@@ -47,3 +47,3 @@ "pre-commit": [

"transform": {
"^.+\\.ts$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
"^.+\\.ts$": "ts-jest"
},

@@ -58,4 +58,3 @@ "transformIgnorePatterns": [

],
"collectCoverage": true,
"mapCoverage": true
"collectCoverage": true
},

@@ -62,0 +61,0 @@ "scripts": {

@@ -5,3 +5,3 @@ # Async Promise Proxy Iterator

[![Coverage Status](https://coveralls.io/repos/github/rubensworks/asynciterator-promiseproxy.js/badge.svg?branch=master)](https://coveralls.io/github/rubensworks/asynciterator-promiseproxy.js?branch=master)
[![npm version](https://badge.fury.io/js/asynciterator-promiseproxy.svg)](https://www.npmjs.com/package/asynciterator-promiseproxy)
[![npm version](https://badge.fury.io/js/asynciterator-promiseproxy.svg)](https://www.npmjs.com/package/asynciterator-promiseproxy) [![Greenkeeper badge](https://badges.greenkeeper.io/rubensworks/asynciterator-promiseproxy.js.svg)](https://greenkeeper.io/)

@@ -8,0 +8,0 @@ An AsyncIterator proxy that allows its source to be set via a promise.

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