Comparing version 1.1.0 to 1.1.1
@@ -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 @@ ------------------ |
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5199
38
122