caniuse-api
Advanced tools
Comparing version 1.6.1 to 2.0.0
@@ -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 @@ |
@@ -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 @@ ] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11435
121
+ Addedcaniuse-lite@^1.0.0
+ Addedbrowserslist@2.11.3(transitive)
+ Addedcaniuse-lite@1.0.30001680(transitive)
- Removedcaniuse-db@^1.0.30000529
- Removedbrowserslist@1.7.7(transitive)
- Removedcaniuse-db@1.0.30001680(transitive)
Updatedbrowserslist@^2.0.0