Get the aspect ratio of a device.
npm install aspect-ratio --save
const ratio = require('aspect-ratio')
console.log(ratio(1920, 1080)) // => 16:9
console.log(ratio(1920, 1080, '/')) // => 16/9
$ aspect-ratio
Get the screen aspect ratio of a device
Usage
$ aspect-ratio <width><height>[options]
options:
-s specified a separator. (by default is ':').
--version output the current version.
examples:
aspect-ratio 1920 1080
aspect-ratio 800 600 -s /
MIT © Kiko Beats