Comparing version 2.0.1 to 2.0.2
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.__esModule = true; | ||
exports.deepFreeze = deepFreeze; | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
/* eslint-disable flowtype/require-parameter-type */ | ||
@@ -25,5 +19,7 @@ | ||
})); | ||
} else if (_typeof(object) === 'object' && object !== null) { | ||
} else if (typeof object === 'object' && object !== null) { | ||
return Object.freeze(Object.keys(object).reduce(function (obj, key) { | ||
return Object.assign(obj, _defineProperty({}, key, deepFreeze(object[key]))); | ||
var _Object$assign; | ||
return Object.assign(obj, (_Object$assign = {}, _Object$assign[key] = deepFreeze(object[key]), _Object$assign)); | ||
}, {})); | ||
@@ -30,0 +26,0 @@ } |
{ | ||
"name": "freezly", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Small utility for deeply freezing objects in JavaScript.", | ||
@@ -36,29 +36,11 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@babel/core": "7.5.4", | ||
"babel-core": "^7.0.0-0", | ||
"babel-jest": "23.0.1", | ||
"babel-preset-nodely": "0.1.1", | ||
"codecov": "3.0.2", | ||
"jest": "23.1.0", | ||
"lintly": "0.2.1", | ||
"nodely": "0.6.0" | ||
}, | ||
"jest": { | ||
"collectCoverage": true, | ||
"collectCoverageFrom": [ | ||
"src/**/*.js" | ||
], | ||
"coverageReporters": [ | ||
"json-summary", | ||
"lcov" | ||
], | ||
"coverageThreshold": { | ||
"global": { | ||
"branches": 100, | ||
"functions": 100, | ||
"lines": 100, | ||
"statements": 100 | ||
} | ||
}, | ||
"testRegex": "/__tests__/.*-test\\.js$" | ||
"babel-jest": "24.8.0", | ||
"babel-preset-nodely": "0.4.2", | ||
"codecov": "3.5.0", | ||
"jest": "24.8.0", | ||
"lintly": "0.3.0", | ||
"nodely": "0.8.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
6148
8
22