MCPcopy Create free account
hub / github.com/angular/dev-infra / wrap

Method wrap

github-actions/saucelabs/set-saucelabs-env.js:19590–19596  ·  view source on GitHub ↗

* Wraps content in an HTML tag, adding any HTML attributes * * @param {string} tag HTML tag to wrap * @param {string | null} content content within the tag * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add * * @returns {string} conten

(tag, content, attrs = {})

Source from the content-addressed store, hash-verified

19588 * @returns {string} content wrapped in HTML element
19589 */
19590 wrap(tag, content, attrs = {}) {
19591 const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join("");
19592 if (!content) {
19593 return `<${tag}${htmlAttrs}>`;
19594 }
19595 return `<${tag}${htmlAttrs}>${content}</${tag}>`;
19596 }
19597 /**
19598 * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.
19599 *

Callers 11

cli.tsFile · 0.45
addCodeBlockMethod · 0.45
addListMethod · 0.45
addTableMethod · 0.45
addDetailsMethod · 0.45
addImageMethod · 0.45
addHeadingMethod · 0.45
addSeparatorMethod · 0.45
addBreakMethod · 0.45
addQuoteMethod · 0.45
addLinkMethod · 0.45

Calls 1

entriesMethod · 0.45

Tested by

no test coverage detected