BC-DCBOR-Parse TypeScript Library - v1.0.0-alpha.20
    Preparing search index...

    Function composeDcborArray

    • Composes a dCBOR array from a slice of string slices, and returns a CBOR object representing the array.

      Each string slice is parsed as a dCBOR item.

      Parameters

      • array: readonly string[]

        Array of strings, each representing a dCBOR item

      Returns ComposeResult<Cbor>

      A CBOR array containing all parsed items

      const result = composeDcborArray(["1", "2", "3"]);
      if (result.ok) {
      console.log(result.value.toDiagnostic()); // "[1, 2, 3]"
      }