Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vigour-ua

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vigour-ua - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

5

index.js

@@ -0,1 +1,2 @@

module.exports = exports = function (_ua, obj) {

@@ -21,2 +22,3 @@ _ua = _ua.toLowerCase()

var _phone = 'phone'
var _firetv = 'firetv'

@@ -77,3 +79,4 @@ /**

[ _castDetect, _chromecast ],
[ 'amazon-fireos|nexus (?=[^1-6])\\d{1,2}', _tablet ]
[ 'amazon-fireos|nexus (?=[^1-6])\\d{1,2}', _tablet ],
['aft', _firetv] //"AFTS" for the current Amazon Fire TV. "AFTB" for the Fire TV (1st Generation), For forward-compatibility with future devices better check just "AFT"
)

@@ -80,0 +83,0 @@

2

package.json
{
"name": "vigour-ua",
"version": "0.0.3",
"version": "0.0.4",
"description": "lightweight ua parser",

@@ -5,0 +5,0 @@ "main": "index.js",

# ua
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![npm version](https://badge.fury.io/js/vigour-ua.svg)](https://badge.fury.io/js/vigour-ua)
[![Build Status](https://travis-ci.org/vigour-io/ua.svg)](https://travis-ci.org/vigour-io/ua)
[![Build Status](https://travis-ci.org/vigour-io/ua.svg?branch=master)](https://travis-ci.org/vigour-io/ua)

@@ -6,0 +6,0 @@ ua parser with a light footprint (~1kb)

@@ -1,1 +0,1 @@

module.exports=exports=function(e,o){function t(e,o){for(var t=arguments,s=t.length-1,a=t[s][0];a!==!0&&!new RegExp(a).test(e)&&s>0;a=t[--s][0]);(o.slice||o.call(this,a,t[s]))&&(this[o]=t[s][1])}e=e.toLowerCase(),o===!0?o=exports:o||(o={});var s="firefox",a="android",r=".+mobile",i="webkit",n="playstation",l="xbox",c="linux",m="crkey",p="chromecast",v="tablet",h="windows",u="phone";return t.call(o,e,function(t,s){o.browser=s[2]||t;var a=e.match(new RegExp("((([\\/ ]version|"+s[0]+"(?!.+version))[/ ])| rv:)([0-9]{1,4}\\.[0-9]{0,2})"));o.version=a?Number(a[4]):0,o.prefix=s[1]},[!0,i],["\\(windows","ms","ie"],["safari",i],[s,"Moz"],["opera","O"],["msie","ms","ie"],["chrome|crios/",i,"chrome"]),t.call(o,e,"platform",[!0,h],[c,c],["lg.{0,3}netcast","lg"],[s+r,s],["mac os x","mac"],["iphone|ipod|ipad","ios"],[l,l],[n,n],[a,a],[h,h],[m,p],["smart-tv;|;samsung;smarttv","samsung"]),t.call(o,e,"device",[!0,"desktop"],[h+".+touch|ipad|"+a,v],["iphone|("+a+r+")|("+s+r+")|"+h+" phone|iemobile",u],[l+"|"+n,"console"],["tv|smarttv|googletv|appletv|hbbtv|pov_tv|netcast.tv|webos.+large","tv"],[m,p],["amazon-fireos|nexus (?=[^1-6])\\d{1,2}",v]),o};
window.ua = function(e,o){function t(e,o){for(var t=arguments,s=t.length-1,a=t[s][0];a!==!0&&!new RegExp(a).test(e)&&s>0;a=t[--s][0]);(o.slice||o.call(this,a,t[s]))&&(this[o]=t[s][1])}e=e.toLowerCase(),o===!0?o=exports:o||(o={});var s="firefox",a="android",r=".+mobile",i="webkit",n="playstation",l="xbox",c="linux",m="crkey",p="chromecast",v="tablet",h="windows",u="phone";return t.call(o,e,function(t,s){o.browser=s[2]||t;var a=e.match(new RegExp("((([\\/ ]version|"+s[0]+"(?!.+version))[/ ])| rv:)([0-9]{1,4}\\.[0-9]{0,2})"));o.version=a?Number(a[4]):0,o.prefix=s[1]},[!0,i],["\\(windows","ms","ie"],["safari",i],[s,"Moz"],["opera","O"],["msie","ms","ie"],["chrome|crios/",i,"chrome"]),t.call(o,e,"platform",[!0,h],[c,c],["lg.{0,3}netcast","lg"],[s+r,s],["mac os x","mac"],["iphone|ipod|ipad","ios"],[l,l],[n,n],[a,a],[h,h],[m,p],["smart-tv;|;samsung;smarttv","samsung"]),t.call(o,e,"device",[!0,"desktop"],[h+".+touch|ipad|"+a,v],["iphone|("+a+r+")|("+s+r+")|"+h+" phone|iemobile",u],[l+"|"+n,"console"],["tv|smarttv|googletv|appletv|hbbtv|pov_tv|netcast.tv|webos.+large","tv"],[m,p],["amazon-fireos|nexus (?=[^1-6])\\d{1,2}",v]),o};
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