Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

freezly

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

freezly - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

4

CHANGELOG.md

@@ -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 @@

14

lib/index.js

@@ -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,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc