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

immutable-class

Package Overview
Dependencies
Maintainers
3
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.9.3 to 0.9.4

2

build/base-immutable/base-immutable.d.ts

@@ -61,3 +61,3 @@ export declare type Validator = (x: any) => void;

getDifference(other: BaseImmutable<ValueType, JSType> | undefined, returnOnFirstDifference?: boolean): string[];
equals(other: BaseImmutable<ValueType, JSType> | undefined): boolean;
equals(other: BaseImmutable<ValueType, JSType>): boolean;
equivalent(other: BaseImmutable<ValueType, JSType>): boolean;

@@ -64,0 +64,0 @@ get(propName: string): any;

@@ -54,2 +54,20 @@ "use strict";

});
describe('getDifference', function () {
var car0 = car_mock_1.Car.fromJS({ name: 'poet' });
it('no other', function () {
chai_1.expect(car0.getDifference(null)).to.deep.equal(['__no_other__']);
});
it('single diff', function () {
var car1 = car_mock_1.Car.fromJS({ name: 'artist' });
chai_1.expect(car0.getDifference(car1)).to.deep.equal(['name']);
});
it('multi diff (multi)', function () {
var car1 = car_mock_1.Car.fromJS({ name: 'artist', fuel: 'electric' });
chai_1.expect(car0.getDifference(car1)).to.deep.equal(['name', 'fuel']);
});
it('multi diff (single)', function () {
var car1 = car_mock_1.Car.fromJS({ name: 'artist', fuel: 'electric' });
chai_1.expect(car0.getDifference(car1, true)).to.deep.equal(['name']);
});
});
describe('equals', function () {

@@ -56,0 +74,0 @@ it('is not equal if new value is explicitly set', function () {

@@ -101,2 +101,9 @@ "use strict";

});
it('overrides large', function () {
var overrides = [];
for (var i = 0; i < 40000; i++) {
overrides.push({ name: 'Over' + i, score: i });
}
chai_1.expect(named_array_1.NamedArray.overridesByName(someArray, overrides).length).to.equal(40003);
});
});

@@ -103,0 +110,0 @@ describe("deleteByName", function () {

export declare function isArrayOf(things: any, constructor: any): boolean;
export declare function isImmutableClass(thing: any): boolean;
export declare function typeCheck<T>(_x: T): void;

@@ -22,1 +22,3 @@ "use strict";

exports.isImmutableClass = isImmutableClass;
function typeCheck(_x) { }
exports.typeCheck = typeCheck;
{
"name": "immutable-class",
"version": "0.9.3",
"version": "0.9.4",
"description": "A template for creating immutable classes",

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

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