Socket
Socket
Sign inDemoInstall

doiuse

Package Overview
Dependencies
33
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.2 to 0.2.3

3

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

@@ -30,2 +30,3 @@ "main": "dist/index.js",

"concat-stream": "^1.4.6",
"css-rule-stream": "^1.0.0",
"duplexer2": "0.0.2",

@@ -32,0 +33,0 @@ "jsonfilter": "^1.1.2",

var through = require('through2'),
duplexer = require('duplexer2'),
concat = require('concat-stream');
rules = require('css-rule-stream');

@@ -12,18 +12,17 @@ var postcss = require('postcss'),

function stream(browsers) {
var out = through.obj();
var inp = concat({encoding: 'string'}, function(css) {
var inp = rules();
var out = through.obj(function(rule, enc, next) {
try {
postcss(doiuse({
browserSelection: browsers,
onUnsupportedFeatureUse: out.write.bind(out)
})).process(css);
onUnsupportedFeatureUse: this.push.bind(this)
})).process(rule.content);
}
catch(e) {
out.write({"message": "error parsing CSS", "error": e});
next(e);
}
finally {
out.end();
}
});
inp.pipe(out);
return duplexer(inp, out);
}

@@ -34,2 +34,3 @@

exec(cmd,function(error, stdout, stderr) {
console.log('CLI output:', stdout);
JSON.parse(stdout).feature.should.be.equal('css-resize')

@@ -36,0 +37,0 @@ });

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc