Socket
Socket
Sign inDemoInstall

@divvit/user-agent-device-mapper

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@divvit/user-agent-device-mapper

Map user agents to desktop, mobile or tablet.


Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
2
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 10 Mar 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc