Commit bdf6d72
committed
refactor(cli): simplify image-handler.ts
- Extract compression logic into compressImageToFitSize() function
- Replace getMimeTypeFromExtension switch with EXTENSION_TO_MIME lookup
- Simplify re-exports with export *
- Use early returns to flatten processImageFile validation
- Remove local aliases, use imported constant names directly
- Simplify extractImagePaths with addPath helper and matchAll()1 parent 73151ef commit bdf6d72
1 file changed
Lines changed: 207 additions & 317 deletions
0 commit comments