(comparator)
| 156 | * @returns {ModuleSetToArrayFunction} set as ordered array |
| 157 | */ |
| 158 | const createOrderedArrayFunction = (comparator) => { |
| 159 | let fn = createOrderedArrayFunctionMap.get(comparator); |
| 160 | if (fn !== undefined) return fn; |
| 161 | fn = (set) => { |
| 162 | set.sortWith(comparator); |
| 163 | return [...set]; |
| 164 | }; |
| 165 | createOrderedArrayFunctionMap.set(comparator, fn); |
| 166 | return fn; |
| 167 | }; |
| 168 | |
| 169 | /** |
| 170 | * Returns the size of the modules. |
no test coverage detected