MCPcopy Index your code
hub / github.com/ampproject/amphtml / attrsToString

Method attrsToString

validator/js/engine/htmlparser_test.js:76–89  ·  view source on GitHub ↗

* Converts a list of attributes to a comma separated string. * @param {!Array<!Object>} attrs * @return {string}

(attrs)

Source from the content-addressed store, hash-verified

74 * @return {string}
75 */
76 attrsToString(attrs) {
77 let str = '[';
78 let first = true;
79 for (const attr of attrs) {
80 if (first) {
81 first = false;
82 } else {
83 str += ',';
84 }
85 str += attr.name + ',' + attr.value;
86 }
87 str += ']';
88 return str;
89 }
90}
91
92describe('HtmlParser', () => {

Callers 2

startTagMethod · 0.95
effectiveBodyTagMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected