(svg, options, label)
| 218 | } |
| 219 | |
| 220 | async function optimizeWithTiming(svg, options, label) { |
| 221 | const start = performance.now(); |
| 222 | const optimized = await optimize(svg, options); |
| 223 | const duration = performance.now() - start; |
| 224 | const delta = svg.length - optimized.length; |
| 225 | |
| 226 | console.error(pc.green(`${label} in ${duration.toFixed(2)}ms`)); |
| 227 | console.error(pc.dim(`Optimization length: ${svg.length} -> ${optimized.length} (${formatDelta(delta)} bytes)`)); |
| 228 | |
| 229 | return optimized; |
| 230 | } |
| 231 | |
| 232 | function collectVectorizeChunks(start, { printChunks = false, showProgress = true } = {}) { |
| 233 | const chunks = printChunks ? null : []; |
no test coverage detected
searching dependent graphs…