fit-dimensions
MITA tiny utility function to fit a source rectangle within a target rectangle using popular object-fit modes (contain, cover, fill, none, scale-down). Maintains aspect ratio as needed. Useful for images, videos, UI elements, and more.
100
Security score
0 known advisories in v2.0.3
Weekly downloads
87
Unpacked size
9.6 kB
Dependencies
0
Last publish
2 months ago
Security advisories
No known vulnerabilities affect v2.0.3.
Downloads — last 30 days
247 total▲ 24.3% vs prior week
Jul 5Aug 3