Skip to main content
Version: v0.0.3

Function: parseBl()

parseBl(el, ctx): BL | undefined

Parse a BL element (one carrying a @value) into a typed BL. Returns undefined when the element is absent. Never throws.

A @nullFlavor declared beside a @value emits CONTRADICTORY_NULL_FLAVOR. The parsed boolean is kept: BL retains no verbatim copy of its token, so withholding value would delete the assertion rather than decline to embellish it (see parsePq).

Parameters

el

any

ctx

ParseCtx

Returns

BL | undefined

Example

import { parseBl } from "@cosyte/ccda";
const bl = parseBl(el, { emit: () => {} });
console.log(bl?.value);