Initial
This commit is contained in:
16
resources/app/node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageDecoderStream.js
generated
vendored
Normal file
16
resources/app/node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageDecoderStream.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
export class SmithyMessageDecoderStream {
|
||||
constructor(options) {
|
||||
this.options = options;
|
||||
}
|
||||
[Symbol.asyncIterator]() {
|
||||
return this.asyncIterator();
|
||||
}
|
||||
async *asyncIterator() {
|
||||
for await (const message of this.options.messageStream) {
|
||||
const deserialized = await this.options.deserializer(message);
|
||||
if (deserialized === undefined)
|
||||
continue;
|
||||
yield deserialized;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user