Comparing version 1.2.0 to 1.2.1
#!/usr/bin/env node | ||
var sys = require("sys"); | ||
var util = require("util"); | ||
var fs = require("fs"); | ||
@@ -44,3 +44,3 @@ var parser = require("./jsonlint").parser; | ||
} catch (e) { | ||
sys.puts(e); | ||
util.puts(e); | ||
process.exit(1); | ||
@@ -58,3 +58,3 @@ } | ||
} else { | ||
sys.puts(source); | ||
util.puts(source); | ||
} | ||
@@ -69,3 +69,3 @@ } else { | ||
stdin.on('end', function () { | ||
sys.puts(parse(source)); | ||
util.puts(parse(source)); | ||
}); | ||
@@ -72,0 +72,0 @@ } |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"preferGlobal": true, | ||
@@ -26,3 +26,3 @@ "repository": { | ||
"engines": { | ||
"node": "0.4 || 0.5" | ||
"node": ">= 0.4" | ||
}, | ||
@@ -41,2 +41,2 @@ "dependencies": { | ||
"homepage": "http://zaach.github.com/jsonlint/" | ||
} | ||
} |
JSON Lint | ||
========= | ||
A pure [JavaScript version](http://zaach.github.com/jsonlint/) of the service provided at [jsonlin.com](http://jsonlint.com). | ||
A pure [JavaScript version](http://zaach.github.com/jsonlint/) of the service provided at [jsonlint.com](http://jsonlint.com). | ||
@@ -6,0 +6,0 @@ ## Command line interface |
@@ -40,2 +40,10 @@ var fs = require("fs"), | ||
exports["test duplicate key"] = function () { | ||
var dup = parser.yy.catchDuplicates; | ||
parser.yy.catchDuplicates = true; | ||
var json = '{"foo": "bar", "foo":"baz"}'; | ||
assert["throws"](function () {parser.parse(json)}, "should throw error"); | ||
parser.yy.catchDuplicates = dup; | ||
}; | ||
exports["test unclosed array"] = function () { | ||
@@ -42,0 +50,0 @@ var json = fs.readFileSync(__dirname + "/fails/2.json").toString(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
53742
960
0
1