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

caniuse-api

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caniuse-api - npm Package Compare versions

Comparing version 1.6.1 to 2.0.0

5

CHANGELOG.md

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

# 2.0.0 - 2017-05-03
- Changed: we now use caniuse-lite instead if caniuse-db
([#59](https://github.com/Nyalab/caniuse-api/pull/59))
# 1.6.1 - 2017-04-07

@@ -2,0 +7,0 @@

19

dist/index.js

@@ -16,12 +16,9 @@ "use strict";

var _caniuseLite = require("caniuse-lite");
var _utils = require("./utils");
var _data = require("caniuse-db/data.json");
var _data2 = _interopRequireDefault(_data);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var features = _data2.default.data;
var featuresList = Object.keys(features);
var featuresList = Object.keys(_caniuseLite.features);

@@ -37,4 +34,4 @@ var browsers = void 0;

var parse = (0, _lodash2.default)(_utils.parseCaniuseData, function (feature, browsers) {
return feature.title + browsers;
var parse = (0, _lodash2.default)(_utils.parseCaniuseData, function (feat, browsers) {
return feat.title + browsers;
});

@@ -45,3 +42,3 @@

try {
feature = features[query];
feature = (0, _caniuseLite.feature)(_caniuseLite.features[query]);
} catch (e) {

@@ -58,7 +55,7 @@ var res = find(query);

try {
data = features[feature];
data = (0, _caniuseLite.feature)(_caniuseLite.features[feature]);
} catch (e) {
var res = find(feature);
if (res.length === 1) {
data = features[res[0]];
data = _caniuseLite.features[res[0]];
} else {

@@ -65,0 +62,0 @@ throw new ReferenceError("Please provide a proper feature name. Cannot find " + feature);

{
"name": "caniuse-api",
"version": "1.6.1",
"version": "2.0.0",
"description": "request the caniuse data to check browsers compatibilities",

@@ -20,4 +20,4 @@ "repository": "https://github.com/nyalab/caniuse-api.git",

"dependencies": {
"browserslist": "^1.3.6",
"caniuse-db": "^1.0.30000529",
"browserslist": "^2.0.0",
"caniuse-lite": "^1.0.0",
"lodash.memoize": "^4.1.2",

@@ -44,3 +44,3 @@ "lodash.uniq": "^4.5.0"

"babel": {
"presets":[
"presets": [
"babel-preset-latest"

@@ -47,0 +47,0 @@ ]

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