@whatwg-node/node-fetch 0.7.1-rc-20241109110503-3ed03e7ecf975aca6e5ec7cebb5581602a23fa7d → 0.7.1

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.
@@ -193,6 +193,9 @@ class PonyfillReadableStream {
193
193
  static [Symbol.hasInstance](instance) {
194
194
  return isReadableStream(instance);
195
195
  }
196
+ static from(iterable) {
197
+ return new PonyfillReadableStream(stream_1.Readable.from(iterable));
198
+ }
196
199
  }
197
200
  exports.PonyfillReadableStream = PonyfillReadableStream;
198
201
  function isPonyfillReadableStream(obj) {
@@ -190,6 +190,9 @@ export class PonyfillReadableStream {
190
190
  static [Symbol.hasInstance](instance) {
191
191
  return isReadableStream(instance);
192
192
  }
193
+ static from(iterable) {
194
+ return new PonyfillReadableStream(Readable.from(iterable));
195
+ }
193
196
  }
194
197
  function isPonyfillReadableStream(obj) {
195
198
  return obj?.readable != null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatwg-node/node-fetch",
3
- "version": "0.7.1-rc-20241109110503-3ed03e7ecf975aca6e5ec7cebb5581602a23fa7d",
3
+ "version": "0.7.1",
4
4
  "description": "Fetch API implementation for Node",
5
5
  "sideEffects": false,
6
6
  "dependencies": {
@@ -16,4 +16,5 @@ export declare class PonyfillReadableStream<T> implements ReadableStream<T> {
16
16
  readable: ReadableStream<T2>;
17
17
  }): ReadableStream<T2>;
18
18
  static [Symbol.hasInstance](instance: unknown): instance is PonyfillReadableStream<unknown>;
19
+ static from<T>(iterable: AsyncIterable<T> | Iterable<T>): PonyfillReadableStream<T>;
19
20
  }
@@ -16,4 +16,5 @@ export declare class PonyfillReadableStream<T> implements ReadableStream<T> {
16
16
  readable: ReadableStream<T2>;
17
17
  }): ReadableStream<T2>;
18
18
  static [Symbol.hasInstance](instance: unknown): instance is PonyfillReadableStream<unknown>;
19
+ static from<T>(iterable: AsyncIterable<T> | Iterable<T>): PonyfillReadableStream<T>;
19
20
  }