1.0.0 • Published 8 years ago
device-type v1.0.0
device-type
Identify a device based on HTTP headers - user-agent but also cloudfront's CloudFront-Is-*-Viewer-headers
Installation
Download node at nodejs.org and install it, if you haven't already.
npm install device-type --save
Usage
import deviceType from 'device-type';
import http from 'http';
http.createServer(req => {
console.log('device type:', deviceType(req));
});
Tests
npm install
npm test
Dependencies
- mobile-detect: Device detection (phone, tablet, desktop, mobile grade, os, versions)
Dev Dependencies
- babel-cli: Babel command line.
- babel-core: Babel compiler core.
- babel-preset-es2015: Babel preset for all es2015 plugins.
- babel-tape-runner: Babel + Tape for running your ES Next tests
- object-assign: ES2015 Object.assign() ponyfill
- package-json-to-readme: Generate a README.md from package.json contents
- semistandard: All the goodness of
feross/standard
with semicolons sprinkled on top. - shot: Injects a fake HTTP request/response into a node HTTP server
- snazzy: Format JavaScript Standard Style as Stylish (i.e. snazzy) output
- tapava: the syntax of ava, run through tape
License
MIT
Generated by package-json-to-readme
1.0.0
8 years ago