@adviser/cement - v0.0.0
    Preparing search index...

    Function uint8array2stream

    • Converts a Uint8Array to a ReadableStream.

      Creates a stream that emits the Uint8Array as a single chunk then closes.

      Parameters

      • str: Uint8Array

        The Uint8Array to convert to a stream

      Returns ReadableStream<Uint8Array<ArrayBufferLike>>

      ReadableStream containing the Uint8Array

      const bytes = new Uint8Array([72, 101, 108, 108, 111]);
      const stream = uint8array2stream(bytes);