@ai-sdk/provider-utils 0.0.15 → 0.0.16
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.
- package/package.json +1 -1
- package/test/dist/index.d.mts +3 -1
- package/test/dist/index.d.ts +3 -1
- package/test/dist/index.js +13 -0
- package/test/dist/index.js.map +1 -1
- package/test/dist/index.mjs +12 -0
- package/test/dist/index.mjs.map +1 -1
package/test/dist/index.mjs
CHANGED
@@ -39,6 +39,17 @@ function convertArrayToReadableStream(values) {
|
|
39
39
|
});
|
40
40
|
}
|
41
41
|
|
42
|
+
// src/test/convert-array-to-async-iterable.ts
|
43
|
+
function convertArrayToAsyncIterable(values) {
|
44
|
+
return {
|
45
|
+
async *[Symbol.asyncIterator]() {
|
46
|
+
for (const value of values) {
|
47
|
+
yield value;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
};
|
51
|
+
}
|
52
|
+
|
42
53
|
// src/test/convert-async-iterable-to-array.ts
|
43
54
|
async function convertAsyncIterableToArray(iterable) {
|
44
55
|
const result = [];
|
@@ -8283,6 +8294,7 @@ var convertStreamToArray = convertReadableStreamToArray;
|
|
8283
8294
|
export {
|
8284
8295
|
JsonTestServer,
|
8285
8296
|
StreamingTestServer,
|
8297
|
+
convertArrayToAsyncIterable,
|
8286
8298
|
convertArrayToReadableStream,
|
8287
8299
|
convertAsyncIterableToArray,
|
8288
8300
|
convertReadableStreamToArray,
|