MCPcopy Create free account
hub / github.com/denoland/std / constructor

Method constructor

cbor/array_encoder_stream.ts:44–64  ·  view source on GitHub ↗

* Constructs a new instance.

()

Source from the content-addressed store, hash-verified

42 * Constructs a new instance.
43 */
44 constructor() {
45 const { readable, writable } = new TransformStream<
46 CborStreamInput,
47 CborStreamInput
48 >();
49 this.#readable = toByteStream(
50 readable
51 .pipeThrough(new CborSequenceEncoderStream())
52 .pipeThrough(
53 new TransformStream({
54 start(controller) {
55 controller.enqueue(new Uint8Array([0b100_11111]));
56 },
57 flush(controller) {
58 controller.enqueue(new Uint8Array([0b111_11111]));
59 },
60 }),
61 ),
62 );
63 this.#writable = writable;
64 }
65
66 /**
67 * Creates a {@link CborArrayEncoderStream} instance from an iterable of

Callers

nothing calls this directly

Calls 1

toByteStreamFunction · 0.85

Tested by

no test coverage detected