Socket
Socket
Sign inDemoInstall

css-loader

Package Overview
Dependencies
1
Maintainers
1
Versions
151
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.1.1

15

index.js

@@ -17,7 +17,12 @@ /*

imports.forEach(function(imp) {
if(imp.media.length > 0) {
result.push(JSON.stringify("@media " + imp.media.join("") + "{"));
}
result.push("require(" + JSON.stringify(__filename) + " + \"!\" + " + JSON.stringify(imp.url) + ")");
if(imp.media.length > 0) {
result.push(JSON.stringify("}"));
}
});
result.push(JSON.stringify(csso.translate(tree)));
console.dir(result);
return "module.exports =\n\t" + result.join(" +\n\t") + ";";

@@ -27,3 +32,2 @@ }

function extractImports(tree) {
console.dir(tree);
var results = [];

@@ -48,5 +52,10 @@ var removes = [];

} else if(item[0] === "ident" && item[1] !== "url") {
imp.media.push(item[1]);
imp.media.push(csso.translate(item));
} else if(item[0] !== "s" || imp.media.length > 0) {
imp.media.push(csso.translate(item));
}
}
while(imp.media.length > 0 &&
/^\s*$/.test(imp.media[imp.media.length-1]))
imp.media.pop();
if(imp.url !== null) {

@@ -53,0 +62,0 @@ results.push(imp);

2

package.json
{
"name": "css-loader",
"version": "0.1.0",
"version": "0.1.1",
"author": "Tobias Koppers @sokra",

@@ -5,0 +5,0 @@ "description": "css loader module for webpack",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc