(nodes, start)
| 106 | * @returns {Sizes} total size |
| 107 | */ |
| 108 | const sumSize = (nodes, start) => { |
| 109 | /** @type {Sizes} */ |
| 110 | const sum = Object.create(null); |
| 111 | for (let i = start || 0; i < nodes.length; i++) { |
| 112 | addSizeTo(sum, nodes[i].size); |
| 113 | } |
| 114 | return sum; |
| 115 | }; |
| 116 | |
| 117 | /** |
| 118 | * Checks whether this object is too big. |
no test coverage detected