(attributes, tagName)
| 2086 | }; |
| 2087 | |
| 2088 | var appendAttributes = function (attributes, tagName) { |
| 2089 | var names = Object.keys(attributes); |
| 2090 | |
| 2091 | if (names.length === 1) { |
| 2092 | appendAttribute(names[0], attributes[names[0]]); |
| 2093 | } |
| 2094 | |
| 2095 | if (names.length <= 1) { |
| 2096 | return; |
| 2097 | } |
| 2098 | |
| 2099 | var firstAttribute = true; |
| 2100 | for (var name in attributes) { |
| 2101 | if (firstAttribute === true) { |
| 2102 | firstAttribute = false; |
| 2103 | appendAttribute(name, attributes[name]); |
| 2104 | } else { |
| 2105 | appendAttributeOnNewLine(name, attributes[name], tagName); |
| 2106 | } |
| 2107 | } |
| 2108 | }; |
| 2109 | |
| 2110 | var appendClosingTag = function (attributes, closeWith) { |
| 2111 | if (Object.keys(attributes).length <= 1) { |
no test coverage detected
searching dependent graphs…