Socket
Book a DemoInstallSign in
Socket

ergonomic-viewport

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ergonomic-viewport

Get the current ergonomic viewport

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

ergonomic-viewport

NPM version build status Test coverage Downloads js-standard-style

Get the current ergonomic viewport.

lwb-ergonomic viewports

Installation

$ npm install ergonomic-viewport

Usage

const viewport = require('ergonomic-viewport')

viewport()
// => 'lap'

API

viewport([number])

Get the ergonomic viewport. Response is one of wrist, palm, lap, desk, and wall. Suggestions for a mall breakpoint value are welcome.

Why?

Defining sizes in terms of known devices causes issues in the future (phablet size, anyone?) so instead it's safer to base names on human ergonomics.

See Also

License

MIT

Keywords

ergonomic

FAQs

Package last updated on 22 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts