Socket
Socket
Sign inDemoInstall

doiuse

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

doiuse - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

13

dist/index.js

@@ -48,8 +48,17 @@ var Detector, featureData, missingSupport, _;

return detector.process(css, function(_arg1) {
var feature, usage;
var browser, feature, loc, message, usage, versions, _i, _len;
feature = _arg1.feature, usage = _arg1.usage;
versions = features[feature].missing;
browsers = [];
for (_i = 0, _len = versions.length; _i < _len; _i++) {
browser = versions[_i];
browsers.push(browser + ' (' + _.keys(versions[browser]).join(',') + ')');
}
loc = usage.source;
message = loc.id + ' line ' + loc.start.line + " : " + feature + ' not supported by ' + browsers.join(',');
return cb({
feature: feature,
featureData: features[feature],
usage: usage
usage: usage,
message: message
});

@@ -56,0 +65,0 @@ });

2

package.json
{
"name": "doiuse",
"version": "0.0.4",
"version": "0.0.5",
"description": "Lint CSS for browser support against caniuse database.",

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

@@ -17,20 +17,3 @@ doiuse

onUnsupportedFeatureUse: function(usageInfo) {
// get human-readable list of browsers (from among those WE selected) that
// don't support the given feature.
var versions = usageInfo.featureData.missing;
var browsers = [];
for(browser in versions) {
browsers.push(
browser + ' (' + Object.keys(versions[browser]).join(',') + ')'
);
}
// the location in the CSS file that triggered this callback
var loc = usageInfo.usage.source;
console.log(
loc.id + ' line ' + loc.start.line + " : " +
usageInfo.feature + ' not supported by ' + browsers.join(',')
);
console.log(usageInfo.message);
}

@@ -37,0 +20,0 @@ })).process("a { background-size: cover; }")

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 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