Socket
Socket
Sign inDemoInstall

raw-loader

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

raw-loader - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

24

index.js

@@ -5,22 +5,6 @@ /*

*/
module.exports = function(contents, options, callback) {
if(callback) {
if(contents.length === 1)
callback(null, "module.exports = " + stringify(contents[0]));
else {
contents.forEach(function(content, index) {
contents[index] = stringify(content);
});
callback(null, "module.exports = [" + contents.join(",\n\t") + "]");
}
} else {
return contents.length === 1 ? contents[0] : contents;
}
module.exports = function() {
var args = Array.prototype.slice(arguments);
args = args.join("");
return "module.exports = " + JSON.stringify(args);
}
function stringify(str) {
return '"' + str.replace(/\\/g, "\\\\")
.replace(/\t/g, "\\t")
.replace(/\r/g, "\\r")
.replace(/\n/g, "\\n")
.replace(/\"/g, "\\\"") + '"';
}

2

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

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

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