A simple npm package that help you to caculate aspect ratio of an image.
npm:
npm i @penguin-ui/aspect-ratio
Yarn:
yarn add @penguin-ui/aspect-ratio
const aspectRatio = require('@penguin-ui/aspect-ratio')
console.log(aspectRatio(1920/1080))
// print [16, 9]
MIT © Nam Hoang