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.
convert(input, { inputFormat: "bitmark", outputFormat: "json" })
const entries = bitmarkToObjects("[.article]\nHello **world**");const bit = entries[0].bit;if (bit.type === "article") console.log(bit.body); Copy
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.
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.