@gmb/bitmark-parser - v7.2.0
    Preparing search index...

    Function bitmarkToObjects

    • Parse bitmark into typed bit entries.

      The typed (object) counterpart of convert(input, { inputFormat: "bitmark", outputFormat: "json" }): returns the entries as objects instead of a JSON string. Bitmark input only — the format is pinned, no auto-detection.

      Parameters

      Returns BitEntry[]

      const entries = bitmarkToObjects("[.article]\nHello **world**");
      const bit = entries[0].bit;
      if (bit.type === "article") console.log(bit.body);

      If the core reports a conversion error.