healthone
Version:
Health One format library for JavaScript
3 lines • 561 B
JavaScript
import stringifyRecord from"./stringifyRecord.js";import defaultStringifyOptions from"./defaultStringifyOptions.js";import expandAndMergeOptions from"./expandAndMergeOptions.js";export default function stringify(a,b){b=expandAndMergeOptions(defaultStringifyOptions,b);const c=Array.from(stringifyRecords(a,b));// For trailing newline
return c.push(""),c.join(b.newline)}function*stringifyRecords(a,b){for(const c of a)for(const a of stringifyRecord(c,b))yield a.filter(a=>a!==void 0).join(b.separator);b.end&&(yield b.end)}
//# sourceMappingURL=stringify.js.map