Comparing version 2.0.0 to 2.0.1
@@ -0,1 +1,5 @@ | ||
# 2.0.1 (2018-06-06) | ||
* Make sure build is ES5. | ||
# 2.0.0 (2018-05-28) | ||
@@ -2,0 +6,0 @@ |
@@ -8,2 +8,6 @@ "use strict"; | ||
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 */ | ||
@@ -19,10 +23,8 @@ | ||
if (Array.isArray(object)) { | ||
return Object.freeze(object.map(item => { | ||
return Object.freeze(object.map(function (item) { | ||
return deepFreeze(item); | ||
})); | ||
} else if (typeof object === 'object' && object !== null) { | ||
return Object.freeze(Object.keys(object).reduce((obj, key) => { | ||
return Object.assign(obj, { | ||
[key]: deepFreeze(object[key]) | ||
}); | ||
} 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]))); | ||
}, {})); | ||
@@ -29,0 +31,0 @@ } |
{ | ||
"name": "freezly", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Small utility for deeply freezing objects in JavaScript.", | ||
@@ -38,10 +38,8 @@ "main": "lib/index.js", | ||
"babel-jest": "23.0.1", | ||
"babel-preset-nodely": "0.1.1", | ||
"codecov": "3.0.2", | ||
"jest": "23.0.1", | ||
"lintly": "0.2.0", | ||
"nodely": "0.4.0" | ||
"jest": "23.1.0", | ||
"lintly": "0.2.1", | ||
"nodely": "0.6.0" | ||
}, | ||
"engines": { | ||
"node": ">= 6" | ||
}, | ||
"jest": { | ||
@@ -48,0 +46,0 @@ "collectCoverage": true, |
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
7036
26
7