@penguin-ui/aspect-ratio
v1.3.0
Published
<a href="https://npmjs.org/package/@penguin-ui/aspect-ratio"><img alt="NPM version" src="https://img.shields.io/npm/v/@penguin-ui/aspect-ratio.svg" /></a> [![Coverage Status](https://coveralls.io/repos/github/particle4dev/aspect-ratio/badge.svg?branch=mas
Downloads
6
Readme
@penguin-ui/aspect-ratio
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