Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsonlint

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonlint - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

8

lib/cli.js
#!/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

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