@penguin-ui/aspect-ratio

NPM version Coverage Status

A simple npm package that help you to caculate aspect ratio of an image.

Installation

npm:

npm i @penguin-ui/aspect-ratio

Yarn:

yarn add @penguin-ui/aspect-ratio

Setup

const aspectRatio = require('@penguin-ui/aspect-ratio')


console.log(aspectRatio(1920/1080))
// print [16, 9]

License

MIT © Nam Hoang