* Constructs a new instance.
()
| 46 | * Constructs a new instance. |
| 47 | */ |
| 48 | constructor() { |
| 49 | const { readable, writable } = new TransformStream< |
| 50 | CborMapStreamInput, |
| 51 | CborMapStreamInput |
| 52 | >(); |
| 53 | this.#readable = toByteStream(ReadableStream.from(async function* () { |
| 54 | yield new Uint8Array([0b101_11111]); |
| 55 | for await (const [k, v] of readable) { |
| 56 | yield encodeCbor(k); |
| 57 | for await (const x of CborSequenceEncoderStream.from([v]).readable) { |
| 58 | yield x; |
| 59 | } |
| 60 | } |
| 61 | yield new Uint8Array([0b111_11111]); |
| 62 | }())); |
| 63 | this.#writable = writable; |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * Creates a {@link CborMapEncoderStream} instance from an iterable of |
nothing calls this directly
no test coverage detected