Comparing version 5.10.1 to 5.10.2
"use strict"; | ||
const path = require('path'); | ||
const fs = require('fs'); | ||
const mkdirpSync = require('./mkdirpSync'); | ||
const writeLazySafeSync = require('./writeLazySafeSync'); | ||
function patchJSON(target, cb, src) { | ||
var entry = JSON.parse(fs.readFileSync(src || target)); | ||
var entry = {}; | ||
try { | ||
entry = JSON.parse(fs.readFileSync(src || target)); | ||
} catch(err) { } | ||
let returned = cb(entry); | ||
mkdirpSync(path.dirname(target)); | ||
fs.writeFileSync(target, JSON.stringify((returned === undefined) ? entry : returned, null, 2)); | ||
returned = JSON.stringify((returned === undefined) ? entry : returned, null, 2); | ||
writeLazySafeSync(target, returned); | ||
} | ||
module.exports = patchJSON; |
@@ -59,3 +59,2 @@ "use strict"; | ||
var req = transport.request(query, function(res) { | ||
@@ -62,0 +61,0 @@ if(!(res.statusCode >= 200 && res.statusCode < 300)) |
{ | ||
"name": "nyks", | ||
"version": "5.10.1", | ||
"version": "5.10.2", | ||
"description": "nodejs exupery style", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
64850
1673