🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

json-file-plus

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-file-plus - npm Package Compare versions

Comparing version

to
1.0.3

{
"name": "json-file-plus",
"version": "1.0.2",
"version": "1.0.3",
"author": "Jordan Harband",

@@ -26,3 +26,3 @@ "description": "Read from and write to a JSON file, minimizing diffs and preserving formatting.",

"dependencies": {
"is": "~1.0.0",
"is": "~1.1.0",
"node.extend": "~1.1.0"

@@ -29,0 +29,0 @@ },

@@ -49,9 +49,9 @@ #json-file-plus <sup>[![Version Badge][2]][1]</sup>

[2]: http://vb.teelaun.ch/ljharb/node-json-file.svg
[3]: https://travis-ci.org/ljharb/node-json-file.png
[3]: https://travis-ci.org/ljharb/node-json-file.svg
[4]: https://travis-ci.org/ljharb/node-json-file
[5]: https://david-dm.org/ljharb/node-json-file.png
[5]: https://david-dm.org/ljharb/node-json-file.svg
[6]: https://david-dm.org/ljharb/node-json-file
[7]: https://david-dm.org/ljharb/node-json-file/dev-status.png
[7]: https://david-dm.org/ljharb/node-json-file/dev-status.svg
[8]: https://david-dm.org/ljharb/node-json-file#info=devDependencies
[9]: https://nodei.co/npm/json-file-plus.png?downloads=true&stars=true

@@ -20,2 +20,6 @@ var test = require('tape');

var isFileNotFoundError = function (err) {
return [34, -2].indexOf(err.errno) > -1;
};
test('requires a callback', function (t) {

@@ -45,3 +49,3 @@ t.plan(6);

t.ok(err, 'error is truthy');
t.ok(err.errno === 34 || err.errno === -2, 'error number is correct');
t.ok(isFileNotFoundError(err), 'error number is correct');
var expectedError = {

@@ -187,3 +191,3 @@ errno: err.errno,

t.ok(err, 'error is truthy');
t.ok(err.errno === 34 || err.errno === -2, 'error number is correct');
t.ok(isFileNotFoundError(err), 'error number is correct');
var expectedError = {

@@ -190,0 +194,0 @@ errno: err.errno,