UNPKG

@itrocks/core-transformers

Version:

Prefabricated HTML and SQL data transformers for it.rocks primitives and basic types

13 lines 513 B
import { HTML, setFormatTransformer } from '@itrocks/transformer'; export class HtmlContainer { mandatoryContainer; container; constructor(mandatoryContainer, container = true) { this.mandatoryContainer = mandatoryContainer; this.container = container; } } export function initContainerTransformers() { setFormatTransformer(HTML, (value, askFor) => (askFor.container && askFor.mandatoryContainer) ? ('<div>' + value + '</div>') : value); } //# sourceMappingURL=container.js.map