buffer-loader
Advanced tools
Comparing version
@@ -5,10 +5,5 @@ module.exports = function(content) { | ||
var array = new Array(); | ||
for (var i = 0; i != content.length; ++i) { | ||
array[i] = content[i]; | ||
} | ||
return 'module.exports = new Buffer(' + JSON.stringify(array) + ')'; | ||
return 'module.exports = Buffer.from("' + content.toString('base64') + '", "base64")'; | ||
}; | ||
module.exports.raw = true; |
{ | ||
"name": "buffer-loader", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "Buffer loader module for webpack", | ||
@@ -9,2 +9,5 @@ "repository": { | ||
}, | ||
"engines": { | ||
"node": ">=5.10" | ||
}, | ||
"licenses": [ | ||
@@ -11,0 +14,0 @@ { |
@@ -12,3 +12,3 @@ # Buffer loader for webpack | ||
``` javascript | ||
var fileContent = require('buffer!./file.bin'); | ||
var fileContent = require('buffer-loader!./file.bin'); | ||
// => returns file.bin content as a buffer | ||
@@ -15,0 +15,0 @@ ``` |
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2053
-21.67%4
-20%6
-40%2
100%