| 483 | }; |
| 484 | |
| 485 | const 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 | |
| 494 | const generateTitleAsString = (type, title, attributes, encode) => { |
| 495 | const attributeString = generateElementAttributesAsString(attributes); |
no outgoing calls
no test coverage detected
searching dependent graphs…