MCPcopy
hub / github.com/nfl/react-helmet / generateElementAttributesAsString

Function generateElementAttributesAsString

src/HelmetUtils.js:485–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483};
484
485const generateElementAttributesAsString = attributes =>
486 Object.keys(attributes).reduce((str, key) => {
487 const attr =
488 typeof attributes[key] !== "undefined"
489 ? `${key}="${attributes[key]}"`
490 : `${key}`;
491 return str ? `${str} ${attr}` : attr;
492 }, "");
493
494const generateTitleAsString = (type, title, attributes, encode) => {
495 const attributeString = generateElementAttributesAsString(attributes);

Callers 2

generateTitleAsStringFunction · 0.85
getMethodsForTagFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…