UNPKG

e2ed

Version:

E2E testing framework over Playwright

19 lines (18 loc) 782 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.List = void 0; const assertValueIsDefined_1 = require("../assertValueIsDefined"); const sanitizeHtml_1 = require("../sanitizeHtml"); const assertValueIsDefined = assertValueIsDefined_1.assertValueIsDefined; const createSafeHtmlWithoutSanitize = sanitizeHtml_1.createSafeHtmlWithoutSanitize; /** * Renders (join) list of any rendered elements. * This base client function should not use scope variables (except other base functions). * @internal */ const List = ({ elements, separator = '', withoutSanitize }) => { const strings = elements || withoutSanitize; assertValueIsDefined(strings); return createSafeHtmlWithoutSanitize `${strings.join(separator)}`; }; exports.List = List;