UNPKG

@octopusdeploy/design-system-components

Version:
21 lines (20 loc) 811 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.literalContent = void 0; // The internal superset tagged template. calloutContent and descriptionText delegate here and only // differ in which nodes their factories (and the node subset T) permit. const literalContent = (strings, ...values) => { const content = []; strings.forEach((str, index) => { if (str !== "") content.push(str); if (index < values.length) { const value = values[index]; if (value === null || value === undefined || value === "" || typeof value === "boolean") return; content.push(typeof value === "number" ? String(value) : value); } }); return content; }; exports.literalContent = literalContent;