1.0.2 • Published 10 years ago

ergonomic-viewport v1.0.2

Weekly downloads
9
License
MIT
Repository
github
Last release
10 years ago

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