You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

response-iterator

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

response-iterator - npm Package Compare versions

Comparing version

to
0.2.23

2

dist/cjs/index.d.ts
/**
* @param response A response. Supports fetch, node-fetch, and cross-fetch
*/
export default function responseIterator<T>(response: unknown): AsyncIterableIterator<T>;
export default function responseIterator<T, TReturn = unknown, TNext = unknown>(response: unknown): AsyncIterableIterator<T, TReturn, TNext>;

@@ -1,1 +0,1 @@

export default function asyncIterator<T>(source: any): AsyncIterableIterator<T>;
export default function asyncIterator<T, TReturn = unknown, TNext = unknown>(source: AsyncIterableIterator<T, TReturn, TNext>): AsyncIterableIterator<T, TReturn, TNext>;
import type { Readable as NodeReadableStream } from 'stream';
export default function nodeStreamIterator<T>(stream: NodeReadableStream): AsyncIterableIterator<T>;
export default function nodeStreamIterator<T, TReturn = unknown, TNext = unknown>(stream: NodeReadableStream): AsyncIterableIterator<T, TReturn, TNext>;

@@ -1,1 +0,1 @@

export default function promiseIterator<T>(promise: any): AsyncIterableIterator<T>;
export default function promiseIterator<T, TReturn = unknown, TNext = unknown>(promise: Promise<T>): AsyncIterableIterator<T, TReturn, TNext>;

@@ -1,1 +0,1 @@

export default function readerIterator<T>(reader: any): AsyncIterableIterator<T>;
export default function readerIterator<T, TReturn = unknown, TNext = unknown>(reader: ReadableStreamReader<T>): AsyncIterableIterator<T, TReturn, TNext>;

@@ -15,3 +15,3 @@ "use strict";

next: function next() {
return reader.read();
return reader.read(undefined);
}

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

/**
* @param response A response. Supports fetch, node-fetch, and cross-fetch
*/
export default function responseIterator<T>(response: unknown): AsyncIterableIterator<T>;
export default function responseIterator<T, TReturn = unknown, TNext = unknown>(response: unknown): AsyncIterableIterator<T, TReturn, TNext>;

@@ -1,1 +0,1 @@

export default function asyncIterator<T>(source: any): AsyncIterableIterator<T>;
export default function asyncIterator<T, TReturn = unknown, TNext = unknown>(source: AsyncIterableIterator<T, TReturn, TNext>): AsyncIterableIterator<T, TReturn, TNext>;
import type { Readable as NodeReadableStream } from 'stream';
export default function nodeStreamIterator<T>(stream: NodeReadableStream): AsyncIterableIterator<T>;
export default function nodeStreamIterator<T, TReturn = unknown, TNext = unknown>(stream: NodeReadableStream): AsyncIterableIterator<T, TReturn, TNext>;

@@ -1,1 +0,1 @@

export default function promiseIterator<T>(promise: any): AsyncIterableIterator<T>;
export default function promiseIterator<T, TReturn = unknown, TNext = unknown>(promise: Promise<T>): AsyncIterableIterator<T, TReturn, TNext>;

@@ -1,1 +0,1 @@

export default function readerIterator<T>(reader: any): AsyncIterableIterator<T>;
export default function readerIterator<T, TReturn = unknown, TNext = unknown>(reader: ReadableStreamReader<T>): AsyncIterableIterator<T, TReturn, TNext>;

@@ -5,3 +5,3 @@ const hasIterator = typeof Symbol !== 'undefined' && Symbol.asyncIterator;

next () {
return reader.read();
return reader.read(undefined);
}

@@ -8,0 +8,0 @@ };

{
"name": "response-iterator",
"version": "0.2.22",
"version": "0.2.23",
"description": "Creates an async iterator for a variety of inputs in the browser and node. Supports fetch, node-fetch, and cross-fetch",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet