lit-xml
Version:
Burning your XML documents to the ground? Yes please. In the mean time, let's use lit-xml.
16 lines • 533 B
JavaScript
import { XmlFragment } from './xml-fragment.js';
const DEFAULT_OPTIONS = {
format: false,
indent: 2,
validators: [],
strictTemplateValues: false,
};
export function createLitXml(overrideOptions) {
const options = Object.freeze({ ...DEFAULT_OPTIONS, ...overrideOptions });
return function xml(xmlLiterals, ...values) {
return new XmlFragment(xmlLiterals, values, options);
};
}
createLitXml.inject = ['lit-xml-options'];
export const xml = createLitXml();
//# sourceMappingURL=create-lit-xml.js.map