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

icepick

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

icepick - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

8

icepick.js

@@ -18,3 +18,9 @@ /**

function weCareAbout(val) {
return null !== val && (Array.isArray(val) || (typeof val === "object"));
return null !== val &&
(Array.isArray(val) ||
// This will skip objects created with `new Foo()`
// but not objects created with `Object.create(proto)`
// The benefit is ignoring DOM elements, which are often
// circular.
(typeof val === "object" && val.constructor === Object));
}

@@ -21,0 +27,0 @@ // for testing

4

icepick.test.js

@@ -269,4 +269,4 @@ /* jshint elision:true */

});
it("should care about dates", function () {
expect(i._weCareAbout([])).to.equal(true);
it("should not care about dates", function () {
expect(i._weCareAbout(new Date())).to.equal(false);
});

@@ -273,0 +273,0 @@ it("should not care about null", function () {

{
"name": "icepick",
"version": "0.2.0",
"version": "0.3.0",
"description": "Utilities for working with frozen objects",

@@ -5,0 +5,0 @@ "main": "icepick.js",

@@ -33,3 +33,3 @@ # icepick [![Build Status via Travis CI](https://travis-ci.org/aearly/icepick.svg?branch=master)](https://travis-ci.org/aearly/icepick) [![NPM version](http://img.shields.io/npm/v/icepick.svg)](https://www.npmjs.org/package/icepick)

Recursively freeze a collection and all its child collections with `Object.freeze()`. Values that are not Arrays or Objects will be ignored. Does not allow reference cycles.
Recursively freeze a collection and all its child collections with `Object.freeze()`. Values that are not plain Arrays or Objects will be ignored, including objects created with custom constructors (e.g. `new MyClass()`). Does not allow reference cycles.

@@ -36,0 +36,0 @@ ```javascript

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