MCPcopy Index your code
hub / github.com/angular/angular / stringifyTNodeAttrs

Function stringifyTNodeAttrs

packages/core/src/hydration/error_handling.ts:244–259  ·  view source on GitHub ↗

* Stringifies a given TNode's attributes * * @param tNode a provided TNode * @returns string

(tNode: TNode)

Source from the content-addressed store, hash-verified

242 * @returns string
243 */
244function stringifyTNodeAttrs(tNode: TNode): string {
245 const results = [];
246 if (tNode.attrs) {
247 for (let i = 0; i < tNode.attrs.length; ) {
248 const attrName = tNode.attrs[i++];
249 // Once we reach the first flag, we know that the list of
250 // attributes is over.
251 if (typeof attrName == 'number') {
252 break;
253 }
254 const attrValue = tNode.attrs[i++];
255 results.push(`${attrName}="${shorten(attrValue as string)}"`);
256 }
257 }
258 return results.join(' ');
259}
260
261/**
262 * The list of internal attributes that should be filtered out while

Callers 1

describeTNodeFunction · 0.85

Calls 3

shortenFunction · 0.85
joinMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…