Neurotic Pantaloon Maker
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

aspect-ratio

2.0.2 • Public • Published

aspect-ratio

Build Status Dependency status Dev Dependencies Status NPM Status Gittip

Get the aspect ratio of a device.

Install

npm install aspect-ratio --save

Usage

with Node.js

const ratio = require('aspect-ratio')
console.log(ratio(1920, 1080)) // => 16:9
console.log(ratio(1920, 1080, '/')) // => 16/9

with CLI

$ 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 /

License

MIT © Kiko Beats

install

npm i aspect-ratio

Downloadsweekly downloads

2,228

version

2.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability