You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

cz

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cz - npm Package Compare versions

Comparing version

to
1.8.1

.nyc_output/83966297b0c4babf4fa82d3a931f3b6e.json

50

lib/index.js

@@ -84,31 +84,37 @@ 'use strict';

value: function load(newPath) {
var file = _fs2.default.readFileSync(newPath, 'utf-8');
this._path = newPath;
// We use 2 as an empty file with a new line would return 1
if (file.length >= 2) {
var data = JSON.parse(file);
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
var file = _fs2.default.readFileSync(newPath, 'utf-8');
this._path = newPath;
// We use 2 as an empty file with a new line would return 1
if (file.length >= 2) {
var data = JSON.parse(file);
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
for (var _iterator2 = Object.keys(data)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
var prop = _step2.value;
try {
for (var _iterator2 = Object.keys(data)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
var prop = _step2.value;
this._config[prop] = data[prop];
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2.return) {
_iterator2.return();
this._config[prop] = data[prop];
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
try {
if (!_iteratorNormalCompletion2 && _iterator2.return) {
_iterator2.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
}
} catch (err) {
if (err.code !== 'ENOENT') {
throw err;
}
}

@@ -115,0 +121,0 @@ }

{
"name": "cz",
"version": "1.8.0",
"version": "1.8.1",
"description": "A simple config utility for nodejs",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet