mem-fs-editor
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -5,3 +5,7 @@ 'use strict'; | ||
if (this.exists(path)) { | ||
return JSON.parse(this.read(path)); | ||
try { | ||
return JSON.parse(this.read(path)); | ||
} catch (error) { | ||
throw new Error('Could not parse JSON in file: ' + path + '. Detail: ' + error.message); | ||
} | ||
} else { | ||
@@ -8,0 +12,0 @@ return defaults; |
{ | ||
"name": "mem-fs-editor", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "File edition helpers working on top of mem-fs", | ||
@@ -30,2 +30,3 @@ "scripts": { | ||
"devDependencies": { | ||
"escape-regexp": "0.0.1", | ||
"mem-fs": "^1.0.0", | ||
@@ -32,0 +33,0 @@ "mocha": "^2.1.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
13252
257
3