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

immutable-class

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

immutable-class - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

8

build/index.js

@@ -55,7 +55,3 @@ "use strict";

var ClassFn = thing.constructor;
var className = ClassFn.name;
return className.length > 1 &&
className[0].toUpperCase() === className[0] &&
typeof ClassFn['is' + className] === 'function' &&
typeof ClassFn.fromJS === 'function' &&
return typeof ClassFn.fromJS === 'function' &&
typeof thing.toJS === 'function' &&

@@ -77,3 +73,3 @@ typeof thing.equals === 'function'; // Has Class#equals

var vA = arrayA[i];
if (!isImmutableClass(vA) || !vA.equals(arrayB[i]))
if (!(vA && typeof vA.equals === 'function' && vA.equals(arrayB[i])))
return false;

@@ -80,0 +76,0 @@ }

{
"name": "immutable-class",
"version": "0.3.3",
"version": "0.3.4",
"description": "A template for creating immutable classes",

@@ -5,0 +5,0 @@ "keywords": [

@@ -48,7 +48,3 @@ "use strict";

var ClassFn = thing.constructor;
var className = ClassFn.name;
return className.length > 1 &&
className[0].toUpperCase() === className[0] && // First letter is upper case
typeof ClassFn['is' + className] === 'function' && // Has Class.isClass
typeof ClassFn.fromJS === 'function' && // Has Class.fromJS
return typeof ClassFn.fromJS === 'function' && // Has Class.fromJS
typeof thing.toJS === 'function' && // Has Class#toJS

@@ -69,3 +65,3 @@ typeof thing.equals === 'function'; // Has Class#equals

var vA: any = arrayA[i];
if (!isImmutableClass(vA) || !vA.equals(arrayB[i])) return false;
if (!(vA && typeof vA.equals === 'function' && vA.equals(arrayB[i]))) return false;
}

@@ -72,0 +68,0 @@ return true;

Sorry, the diff of this file is not supported yet

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