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

jsonfile

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonfile - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

CHANGELOG.md

@@ -0,1 +1,5 @@

1.1.1 / 2013-11-11
------------------
* fixed catching of callback bug (ffissore / #5)
1.1.0 / 2013-10-11

@@ -2,0 +6,0 @@ ------------------

18

lib/jsonfile.js

@@ -10,9 +10,11 @@ var fs = require('fs');

if (err) return callback(err, null);
var obj = null;
try {
var obj = JSON.parse(data);
callback(null, obj);
obj = JSON.parse(data);
} catch (err2) {
callback(err2, null);
}
return;
}
callback(null, obj);
})

@@ -30,3 +32,3 @@ }

}
var str = '';

@@ -36,4 +38,6 @@ try {

} catch (err) {
if (callback)
callback(err, null);
if (callback) {
callback(err, null);
}
return;
}

@@ -40,0 +44,0 @@ fs.writeFile(file, str, options, callback);

{
"name": "jsonfile",
"version": "1.1.0",
"version": "1.1.1",
"description": "Easily read/write JSON files.",

@@ -9,3 +9,3 @@ "repository": {

},
"keywords": [],
"keywords": ["read", "write", "file", "json"],
"author": "JP Richardson <jprichardson@gmail.com>",

@@ -12,0 +12,0 @@ "licenses": [

@@ -106,4 +106,5 @@ [![build status](https://secure.travis-ci.org/jprichardson/node-jsonfile.png)](http://travis-ci.org/jprichardson/node-jsonfile)

- [JP Richardson](https://github.com/jprichardson)
- [Sean O'Dell](https://github.com/seanodell)
- [*] [JP Richardson](https://github.com/jprichardson)
- [2] [Sean O'Dell](https://github.com/seanodell)
- [1] [Federico Fissore](https://github.com/ffissore)

@@ -110,0 +111,0 @@

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