response-iterator 0.2.19 → 0.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @param response A response. Supports fetch, node-fetch, and cross-fetch
3
+ */
4
+ export default function responseIterator<T>(response: unknown): AsyncIterableIterator<T>;
@@ -0,0 +1 @@
1
+ export default function asyncIterator<T>(source: any): AsyncIterableIterator<T>;
@@ -0,0 +1,2 @@
1
+ import type { Readable as NodeReadableStream } from 'stream';
2
+ export default function nodeStreamIterator<T>(stream: NodeReadableStream): AsyncIterableIterator<T>;
@@ -0,0 +1 @@
1
+ export default function promiseIterator<T>(promise: any): AsyncIterableIterator<T>;
@@ -0,0 +1 @@
1
+ export default function readerIterator<T>(reader: any): AsyncIterableIterator<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "response-iterator",
3
- "version": "0.2.19",
3
+ "version": "0.2.21",
4
4
  "description": "Creates an async iterator for a variety of inputs in the browser and node. Supports fetch, node-fetch, and cross-fetch",
5
5
  "keywords": [
6
6
  "Symbol",
@@ -43,15 +43,13 @@
43
43
  "exports": {
44
44
  ".": {
45
45
  "import": "./dist/esm/index.mjs",
46
- "require": "./dist/cjs/index.cjs",
47
- "types": "./dist/types/index.d.ts"
46
+ "require": "./dist/cjs/index.cjs"
48
47
  },
49
- "./*": "./*"
48
+ "./package.json": "./package.json",
49
+ "./umd": "./dist/umd/response-iterator.cjs"
50
50
  },
51
51
  "main": "dist/cjs/index.cjs",
52
- "unpkg": "dist/umd/response-iterator.cjs",
53
- "module": "dist/esm/index.mjs",
54
- "types": "dist/types/index.d.ts",
52
+ "types": "dist/cjs/index.d.cts",
55
53
  "files": [
56
54
  "dist"
57
55
  ],
@@ -66,9 +64,6 @@
66
64
  "test:node": "tsds test:node --no-timeouts && tsds test:node --no-timeouts \"test/**/*.test-node.*\"",
67
65
  "version": "tsds version"
68
66
  },
69
- "dependencies": {
70
- "readable-stream": "^2.3.8"
71
- },
72
67
  "devDependencies": {
73
68
  "@types/mocha": "*",
74
69
  "@types/node": "*",
@@ -79,6 +74,7 @@
79
74
  "isomorphic-fetch": "*",
80
75
  "node-fetch": "*",
81
76
  "pinkie-promise": "*",
77
+ "readable-stream": "^2.3.8",
82
78
  "tsds-web-test-runner": "*",
83
79
  "undici": "*"
84
80
  },
File without changes