multiformats - v14.0.0
    Preparing search index...

    Function coerce

    • Normalize binary input to a plain Uint8Array backed by an ArrayBuffer.

      Returns the input itself when it is already a plain Uint8Array over an ArrayBuffer, otherwise a fresh view (or, for SharedArrayBuffer-backed input, a copy) over the same bytes.

      Throws if input is not a recognised binary type.

      Parameters

      Returns Uint8Array<ArrayBuffer>