New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

caniuse-support

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caniuse-support - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

8

CHANGELOG.md

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

## 0.4.4 (March 21, 2019)
- Dependencies update
## 0.4.3 (September 1, 2019)
- Dependencies update
## 0.4.2 (July 3, 2018)

@@ -2,0 +10,0 @@

29

cjs/browser.js

@@ -10,7 +10,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var bowser = require("bowser");
var Bowser = require("bowser");
// bowser id -> caniuse id
var browserIDMap = {
msie: "ie",
msedge: "edge",
"internet explorer": "ie",
"microsoft edge": "edge",
firefox: "firefox",

@@ -20,6 +20,6 @@ chrome: "chrome",

opera: "opera",
ucbrowser: "and_uc",
samsungBrowser: "samsung",
"uc browser": "and_uc",
"samsung internet for android": "samsung",
blackberry: "bb",
android: "android",
"android browser": "android",
ios: "ios_saf",

@@ -31,7 +31,10 @@ };

function detectBrowser(ua) {
var bowserInst = ua ? bowser._detect(ua) : bowser;
var version = bowserInst.version.toString();
if (!ua) {
return;
}
var bowserInst = Bowser.getParser(ua);
var version = bowserInst.getBrowserVersion().toString();
var bid = "unknown";
for (var b in browserIDMap) {
if (bowserInst[b]) {
if (bowserInst.getBrowserName().toLowerCase() === b) {
bid = browserIDMap[b];

@@ -44,6 +47,6 @@ break;

// is better tracked in the caniuse database.
if (bid === "safari" && bowserInst.ios) {
if (bid === "safari" && bowserInst.getOS().name === "iOS") {
bid = "ios_saf";
}
else if (bid === "ie" && bowserInst.windowsphone) {
else if (bid === "ie" && bowserInst.getOS().name === "Windows Phone") {
bid = "ie_mob";

@@ -53,6 +56,6 @@ }

if (bid === "android") {
version = bowserInst.osversion.toString();
version = bowserInst.getOSVersion().toString();
}
else if (bid === "ios_saf") {
version = bowserInst.osversion.toString();
version = bowserInst.getOSVersion().toString();
}

@@ -59,0 +62,0 @@ return { id: bid, version: version };

@@ -74,2 +74,6 @@ "use strict";

var from = v.split("-").map(function (x) { return parseFloat(x); })[0];
if (isNaN(from)) {
match = v.split("-")[0];
break;
}
if (targetVersion >= from) {

@@ -76,0 +80,0 @@ match = v;

@@ -8,7 +8,7 @@ /**

*/
import * as bowser from "bowser";
import * as Bowser from "bowser";
// bowser id -> caniuse id
var browserIDMap = {
msie: "ie",
msedge: "edge",
"internet explorer": "ie",
"microsoft edge": "edge",
firefox: "firefox",

@@ -18,6 +18,6 @@ chrome: "chrome",

opera: "opera",
ucbrowser: "and_uc",
samsungBrowser: "samsung",
"uc browser": "and_uc",
"samsung internet for android": "samsung",
blackberry: "bb",
android: "android",
"android browser": "android",
ios: "ios_saf",

@@ -29,7 +29,10 @@ };

export function detectBrowser(ua) {
var bowserInst = ua ? bowser._detect(ua) : bowser;
var version = bowserInst.version.toString();
if (!ua) {
return;
}
var bowserInst = Bowser.getParser(ua);
var version = bowserInst.getBrowserVersion().toString();
var bid = "unknown";
for (var b in browserIDMap) {
if (bowserInst[b]) {
if (bowserInst.getBrowserName().toLowerCase() === b) {
bid = browserIDMap[b];

@@ -42,6 +45,6 @@ break;

// is better tracked in the caniuse database.
if (bid === "safari" && bowserInst.ios) {
if (bid === "safari" && bowserInst.getOS().name === "iOS") {
bid = "ios_saf";
}
else if (bid === "ie" && bowserInst.windowsphone) {
else if (bid === "ie" && bowserInst.getOS().name === "Windows Phone") {
bid = "ie_mob";

@@ -51,6 +54,6 @@ }

if (bid === "android") {
version = bowserInst.osversion.toString();
version = bowserInst.getOSVersion().toString();
}
else if (bid === "ios_saf") {
version = bowserInst.osversion.toString();
version = bowserInst.getOSVersion().toString();
}

@@ -57,0 +60,0 @@ return { id: bid, version: version };

@@ -71,2 +71,6 @@ /**

var from = v.split("-").map(function (x) { return parseFloat(x); })[0];
if (isNaN(from)) {
match = v.split("-")[0];
break;
}
if (targetVersion >= from) {

@@ -73,0 +77,0 @@ match = v;

{
"name": "caniuse-support",
"version": "0.4.3",
"version": "0.4.4",
"description": "Query the caniuse offline database for feature support.",

@@ -22,14 +22,15 @@ "homepage": "https://github.com/wikiwi/caniuse-support",

"scripts": {
"all": "npm run lint && npm run test && npm run build",
"all": "yarn run lint && yarn run test && yarn run build",
"build": "gulp && webpack && cross-env BUILD_MINIFIED=true webpack",
"clean": "rm -r -f dist lib cjs coverage",
"lint": "gulp lint",
"release": "npm version -m 'caniuse-support release %s'",
"release": "yarn version -m 'caniuse-support release %s'",
"ci:coveralls": "cat coverage/lcov.info | coveralls",
"test": "cross-env TS_NODE_FILES=true TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' mocha --opts mocha.opts",
"test:coverage": "cross-env TS_NODE_FILES=true TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' istanbul cover node_modules/.bin/_mocha -- --opts mocha.opts",
"test:watch": "npm run test -- --watch"
"test:watch": "yarn run test -- --watch",
"prepublishOnly": "yarn all"
},
"engines": {
"node": ">=4"
"node": ">=8"
},

@@ -46,3 +47,3 @@ "keywords": [

"@types/mocha": "^5.2.4",
"@types/node": "^10.5.1",
"@types/node": "^11.11.4",
"awesome-typescript-loader": "^5.2.0",

@@ -57,3 +58,3 @@ "cash-cat": "^0.2.0",

"eslint-plugin-import": "^2.13.0",
"gulp": "^3.9.1",
"gulp": "^4.0.0",
"gulp-eslint": "^5.0.0",

@@ -63,18 +64,18 @@ "gulp-jsonlint": "^1.1.2",

"gulp-tslint": "^8.1.3",
"gulp-typescript": "^4.0.2",
"gulp-typescript": "^5.0.0",
"gulp-yaml-validate": "^1.0.2",
"istanbul": "^1.1.0-alpha.1",
"merge2": "^1.2.2",
"mocha": "^5.2.0",
"ts-node": "^7.0.0",
"mocha": "^6.0.2",
"ts-node": "^8.0.3",
"tslint": "^5.10.0",
"typescript": "^2.9.2",
"uglifyjs-webpack-plugin": "^1.2.7",
"webpack": "^4.14.0",
"webpack-cli": "^3.0.0"
"uglifyjs-webpack-plugin": "^2.0.0",
"webpack": "^4.29.3",
"webpack-cli": "^3.1.2"
},
"dependencies": {
"bowser": "^1.9.4",
"caniuse-lite": "^1.0.30000883"
"bowser": "^2.1.2",
"caniuse-lite": "^1.0.30000951"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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