JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1918
  • Score
    100M100P100Q114530F
  • License MIT

JavaScript module to check if user agent to return the device and browser.

Package Exports

  • device-detect

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (device-detect) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Device Detect

JavaScript module to check if user agent to return the device and browser.

Install

npm install device-detect --save-dev

Use

var deviceDetect = require('device-detect');

// return all device and browser object
var deviceDetect = deviceDetect();

// result example:
/* {
  "device":"Macintosh",
  "browser":"Chrome"
} */

Release History

  • 1.0.2: Update description.
  • 1.0.1: Update documentation.
  • 1.0.0: Initial release.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am "Add some feature")
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request