New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

cleanjson

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cleanjson - npm Package Compare versions

Comparing version
0.1.1
to
0.1.2
+0
-37
lib/cleanjson.js

@@ -1,6 +0,1 @@

var jsonData = "";
// console mode only:
if (!module.parent) { var stdin = process.openStdin(); }
var clean = function(jsonInput, callback) {

@@ -27,35 +22,3 @@

if (!module.parent) { // in console mode only
stdin.on('data', function(chunk) {
jsonData += chunk;
});
stdin.on('end', function() {
clean(jsonData, function(err, cleanJSON) {
if (err) {
process.stdout.write ("ERROR: Malformed JSON Document provided as input. Exiting.\n");
process.exit(1);
}
process.stdout.write(cleanJSON);
process.stdout.write("\n");
process.exit(0);
});
});
}
// Exports
module.exports.clean = clean;
module.exports.init = function() {
if (!module.parent) {
stdin.setEncoding("utf8");
stdin.resume();
}
}
+1
-1
{
"name": "cleanjson"
, "description": "Format JSON document from stdin as 'comma-first' JSON"
, "version": "0.1.1"
, "version": "0.1.2"
, "repository": {

@@ -6,0 +6,0 @@ "type": "git"

Sorry, the diff of this file is not supported yet