Socket
Socket
Sign inDemoInstall

@edge-runtime/user-agent

Package Overview
Dependencies
0
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

README.md

2

dist/index.d.ts

@@ -27,3 +27,3 @@ interface UserAgent {

declare function userAgentFromString(input: string | undefined): UserAgent;
declare type HeaderLike = {
type HeaderLike = {
get(key: string): string | null | undefined;

@@ -30,0 +30,0 @@ };

@@ -29,9 +29,9 @@ "use strict";

// ../../node_modules/.pnpm/ua-parser-js@1.0.2/node_modules/ua-parser-js/src/ua-parser.js
// ../../node_modules/.pnpm/ua-parser-js@1.0.33/node_modules/ua-parser-js/src/ua-parser.js
var require_ua_parser = __commonJS({
"../../node_modules/.pnpm/ua-parser-js@1.0.2/node_modules/ua-parser-js/src/ua-parser.js"(exports, module2) {
"../../node_modules/.pnpm/ua-parser-js@1.0.33/node_modules/ua-parser-js/src/ua-parser.js"(exports, module2) {
(function(window2, undefined2) {
"use strict";
var LIBVERSION = "1.0.2", EMPTY = "", UNKNOWN = "?", FUNC_TYPE = "function", UNDEF_TYPE = "undefined", OBJ_TYPE = "object", STR_TYPE = "string", MAJOR = "major", MODEL = "model", NAME = "name", TYPE = "type", VENDOR = "vendor", VERSION = "version", ARCHITECTURE = "architecture", CONSOLE = "console", MOBILE = "mobile", TABLET = "tablet", SMARTTV = "smarttv", WEARABLE = "wearable", EMBEDDED = "embedded", UA_MAX_LENGTH = 255;
var AMAZON = "Amazon", APPLE = "Apple", ASUS = "ASUS", BLACKBERRY = "BlackBerry", BROWSER = "Browser", CHROME = "Chrome", EDGE = "Edge", FIREFOX = "Firefox", GOOGLE = "Google", HUAWEI = "Huawei", LG = "LG", MICROSOFT = "Microsoft", MOTOROLA = "Motorola", OPERA = "Opera", SAMSUNG = "Samsung", SONY = "Sony", XIAOMI = "Xiaomi", ZEBRA = "Zebra", FACEBOOK = "Facebook";
var LIBVERSION = "1.0.33", EMPTY = "", UNKNOWN = "?", FUNC_TYPE = "function", UNDEF_TYPE = "undefined", OBJ_TYPE = "object", STR_TYPE = "string", MAJOR = "major", MODEL = "model", NAME = "name", TYPE = "type", VENDOR = "vendor", VERSION = "version", ARCHITECTURE = "architecture", CONSOLE = "console", MOBILE = "mobile", TABLET = "tablet", SMARTTV = "smarttv", WEARABLE = "wearable", EMBEDDED = "embedded", UA_MAX_LENGTH = 350;
var AMAZON = "Amazon", APPLE = "Apple", ASUS = "ASUS", BLACKBERRY = "BlackBerry", BROWSER = "Browser", CHROME = "Chrome", EDGE = "Edge", FIREFOX = "Firefox", GOOGLE = "Google", HUAWEI = "Huawei", LG = "LG", MICROSOFT = "Microsoft", MOTOROLA = "Motorola", OPERA = "Opera", SAMSUNG = "Samsung", SHARP = "Sharp", SONY = "Sony", XIAOMI = "Xiaomi", ZEBRA = "Zebra", FACEBOOK = "Facebook";
var extend = function(regexes2, extensions) {

@@ -61,3 +61,3 @@ var mergedRegexes = {};

if (typeof str === STR_TYPE) {
str = str.replace(/^\s\s*/, EMPTY).replace(/\s\s*$/, EMPTY);
str = str.replace(/^\s\s*/, EMPTY);
return typeof len === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH);

@@ -167,3 +167,3 @@ }

/(?:ms|\()(ie) ([\w\.]+)/i,
/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,
/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,
/(weibo)__([\d\.]+)/i

@@ -177,3 +177,4 @@ ],

[
/\bqbcore\/([\w\.]+)/i
/microm.+\bqbcore\/([\w\.]+)/i,
/\bqbcore\/([\w\.]+).+microm/i
],

@@ -234,3 +235,3 @@ [VERSION, [NAME, "WeChat(Win) Desktop"]],

[
/(oculus|samsung|sailfish)browser\/([\w\.]+)/i
/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i
],

@@ -250,3 +251,4 @@ [[NAME, /(.+)/, "$1 " + BROWSER], VERSION],

/(metasr)[\/ ]?([\w\.]+)/i,
/(lbbrowser)/i
/(lbbrowser)/i,
/\[(linkedin)app\]/i
],

@@ -285,7 +287,7 @@ [NAME],

[
/version\/([\w\.]+) .*mobile\/\w+ (safari)/i
/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i
],
[VERSION, [NAME, "Mobile Safari"]],
[
/version\/([\w\.]+) .*(mobile ?safari|safari)/i
/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i
],

@@ -319,3 +321,7 @@ [VERSION, NAME],

],
[NAME, VERSION]
[NAME, VERSION],
[
/(cobalt)\/([\w\.]+)/i
],
[NAME, [VERSION, /master.|lts./, ""]]
],

@@ -362,3 +368,3 @@ cpu: [

[
/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i
/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i
],

@@ -383,2 +389,6 @@ [MODEL, [VENDOR, SAMSUNG], [TYPE, TABLET]],

[
/(macintosh);/i
],
[MODEL, [VENDOR, APPLE]],
[
/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i

@@ -389,3 +399,3 @@ ],

/(?:huawei|honor)([-\w ]+)[;\)]/i,
/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i
/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
],

@@ -398,3 +408,3 @@ [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]],

/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
],

@@ -459,3 +469,3 @@ [[MODEL, /_/g, " "], [VENDOR, XIAOMI], [TYPE, MOBILE]],

[
/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
],

@@ -507,3 +517,3 @@ [MODEL, [VENDOR, SONY], [TYPE, MOBILE]],

/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,
/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i
/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i
],

@@ -523,3 +533,3 @@ [VENDOR, [MODEL, /_/g, " "], [TYPE, MOBILE]],

],
[MODEL, [VENDOR, "Sharp"], [TYPE, MOBILE]],
[MODEL, [VENDOR, SHARP], [TYPE, MOBILE]],
[

@@ -702,6 +712,15 @@ /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,

[
/\(dtv[\);].+(aquos)/i
/\(dtv[\);].+(aquos)/i,
/(aquos-tv[\w ]+)\)/i
],
[MODEL, [VENDOR, "Sharp"], [TYPE, SMARTTV]],
[MODEL, [VENDOR, SHARP], [TYPE, SMARTTV]],
[
/(bravia[\w ]+)( bui|\))/i
],
[MODEL, [VENDOR, SONY], [TYPE, SMARTTV]],
[
/(mitv-\w{5}) bui/i
],
[MODEL, [VENDOR, XIAOMI], [TYPE, SMARTTV]],
[
/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,

@@ -748,3 +767,3 @@ /hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i

[
/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i
/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i
],

@@ -805,3 +824,3 @@ [[TYPE, MOBILE]],

[
/droid ([\w\.]+)\b.+(android[- ]x86)/i
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i
],

@@ -808,0 +827,0 @@ [VERSION, NAME],

{
"name": "@edge-runtime/user-agent",
"description": "An Edge Runtime compatible user agent parsing utility",
"description": "An Edge Runtime compatible user-agent parsing utility",
"homepage": "https://edge-runtime.vercel.app/packages/user-agent",
"version": "1.1.0",
"version": "1.1.1",
"main": "dist/index.js",

@@ -17,12 +17,21 @@ "module": "dist/index.mjs",

"keywords": [
"edge",
"edge-runtime",
"functions",
"runtime",
"standard",
"ua-parser",
"ua-parser-js",
"user-agent"
"user-agent",
"web"
],
"devDependencies": {
"@edge-runtime/jest-environment": "1.1.0",
"@edge-runtime/jest-environment": "2.0.7",
"@types/ua-parser-js": "0.7.36",
"tsup": "6",
"ua-parser-js": "1.0.2"
"ua-parser-js": "1.0.33"
},
"engines": {
"node": ">=14"
},
"files": [

@@ -29,0 +38,0 @@ "dist"

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc