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

@jamashita/anden-object

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jamashita/anden-object - npm Package Compare versions

Comparing version 2.23.0 to 2.24.0

4

dist/cjs/Entity.d.ts

@@ -1,5 +0,3 @@

import { Cloneable } from '@jamashita/anden-type';
import { Objet } from './Objet';
export declare abstract class Entity<I, T extends Entity<I, T>> extends Objet implements Cloneable<T> {
abstract duplicate(): T;
export declare abstract class Entity<I> extends Objet {
abstract getIdentifier(): I;

@@ -6,0 +4,0 @@ abstract serialize(): string;

import { ObjectLiteral } from '@jamashita/anden-type';
import { Entity } from '../Entity';
export declare class MockEntity<V> extends Entity<V, MockEntity<V>> {
export declare class MockEntity<V> extends Entity<V> {
private readonly id;
private other;
constructor(id: V, other: ObjectLiteral);
duplicate(): MockEntity<V>;
getIdentifier(): V;

@@ -9,0 +8,0 @@ serialize(): string;

@@ -14,5 +14,2 @@ "use strict";

}
duplicate() {
return new MockEntity(this.id, this.other);
}
getIdentifier() {

@@ -19,0 +16,0 @@ return this.id;

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

hashCode() {
return (0, object_hash_1.default)(this);
const obj = {};
Object.entries(this).forEach(([k, v]) => {
obj[k] = v;
});
return (0, object_hash_1.default)(obj);
}

@@ -26,0 +30,0 @@ toString() {

@@ -1,5 +0,3 @@

import { Cloneable } from '@jamashita/anden-type';
import { Objet } from './Objet';
export declare abstract class Entity<I, T extends Entity<I, T>> extends Objet implements Cloneable<T> {
abstract duplicate(): T;
export declare abstract class Entity<I> extends Objet {
abstract getIdentifier(): I;

@@ -6,0 +4,0 @@ abstract serialize(): string;

import { ObjectLiteral } from '@jamashita/anden-type';
import { Entity } from '../Entity';
export declare class MockEntity<V> extends Entity<V, MockEntity<V>> {
export declare class MockEntity<V> extends Entity<V> {
private readonly id;
private other;
constructor(id: V, other: ObjectLiteral);
duplicate(): MockEntity<V>;
getIdentifier(): V;

@@ -9,0 +8,0 @@ serialize(): string;

@@ -11,5 +11,2 @@ import { Entity } from '../Entity';

}
duplicate() {
return new MockEntity(this.id, this.other);
}
getIdentifier() {

@@ -16,0 +13,0 @@ return this.id;

@@ -17,3 +17,7 @@ import { Kind } from '@jamashita/anden-type';

hashCode() {
return hash(this);
const obj = {};
Object.entries(this).forEach(([k, v]) => {
obj[k] = v;
});
return hash(obj);
}

@@ -20,0 +24,0 @@ toString() {

{
"name": "@jamashita/anden-object",
"version": "2.23.0",
"version": "2.24.0",
"private": false,

@@ -5,0 +5,0 @@ "repository": {

@@ -1,7 +0,5 @@

import { Cloneable, isEqualable } from '@jamashita/anden-type';
import { isEqualable } from '@jamashita/anden-type';
import { Objet } from './Objet';
export abstract class Entity<I, T extends Entity<I, T>> extends Objet implements Cloneable<T> {
public abstract duplicate(): T;
export abstract class Entity<I> extends Objet {
public abstract getIdentifier(): I;

@@ -8,0 +6,0 @@

@@ -5,3 +5,3 @@ import { ObjectLiteral } from '@jamashita/anden-type';

export class MockEntity<V> extends Entity<V, MockEntity<V>> {
export class MockEntity<V> extends Entity<V> {
private readonly id: V;

@@ -16,6 +16,2 @@ private other: ObjectLiteral;

public duplicate(): MockEntity<V> {
return new MockEntity<V>(this.id, this.other);
}
public getIdentifier(): V {

@@ -22,0 +18,0 @@ return this.id;

@@ -26,3 +26,9 @@ import { Kind, Nominative } from '@jamashita/anden-type';

public hashCode(): string {
return hash(this);
const obj: Record<string, unknown> = {};
Object.entries(this).forEach(([k, v]: [string, unknown]) => {
obj[k] = v;
});
return hash(obj);
}

@@ -29,0 +35,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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