@divvit/user-agent-device-mapper

2.0.0 • Public • Published

User Agent Device Mapper

A small library to map user agents to either (desktop, mobile, tablet) device types.

Installation

npm install user-agent-device-mapper --save

Usage

var uaMapper = require('user-agent-device-mapper');

var deviceType = uaMapper.getDeviceType('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36');

console.log('device type: ', deviceType);

Tests

npm test

Contributing

Nino Ulsamer, Divvit AB

Release History

  • 0.0.1 Initial release
  • 1.0.0 Migrated to divvit organization
  • 1.0.1 Fixed global variable leak

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.00latest

Version History

VersionDownloads (Last 7 Days)Published
2.0.00
1.0.10
1.0.00

Package Sidebar

Install

npm i @divvit/user-agent-device-mapper

Weekly Downloads

0

Version

2.0.0

License

MIT

Last publish

Collaborators

  • sportradar_analytics
  • bigparaboom
  • injog
  • xmar