Function: elementOptional()
elementOptional(
seg,n,delimiters):string|undefined
Read element N (1-indexed) as string | undefined. Empty strings
collapse to undefined - the conventional "absent" sentinel for
optional element slots.
Parameters
seg
n
number
delimiters
Returns
string | undefined
Example
import { elementOptional } from "@cosyte/x12";
// returns undefined when NM1-04 is "" or missing