* Creates a CborMapEncoderStream instance from an iterable of * CborMapStreamInput chunks. * * @example Usage * ```ts * import { assert, assertEquals } from "@std/assert"; * import { * CborMapDecodedStream, * CborMapEncoderStream, * CborSequenceDecode
(
asyncIterable:
| AsyncIterable<CborMapStreamInput>
| Iterable<CborMapStreamInput>,
)
| 101 | * @returns A {@link CborMapEncoderStream} instance of the encoded data. |
| 102 | */ |
| 103 | static from( |
| 104 | asyncIterable: |
| 105 | | AsyncIterable<CborMapStreamInput> |
| 106 | | Iterable<CborMapStreamInput>, |
| 107 | ): CborMapEncoderStream { |
| 108 | const encoder = new CborMapEncoderStream(); |
| 109 | ReadableStream.from(asyncIterable).pipeTo(encoder.writable); |
| 110 | return encoder; |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * The {@link ReadableStream<Uint8Array>} associated with the instance, which |
no outgoing calls
no test coverage detected