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

utilium

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utilium - npm Package Compare versions

Comparing version 0.5.9 to 0.5.10

8

dist/list.d.ts
import { EventEmitter } from 'eventemitter3';
export declare class List<T> extends EventEmitter<'update'> implements Set<T>, RelativeIndexable<T> {
readonly [Symbol.toStringTag] = "List";
constructor(values?: readonly T[] | Iterable<T> | null);
protected data: Set<T>;

@@ -18,2 +19,9 @@ array(): T[];

delete(value: T): boolean;
union<U>(other: ReadonlySetLike<U>): List<T | U>;
intersection<U>(other: ReadonlySetLike<U>): List<T & U>;
difference<U>(other: ReadonlySetLike<U>): List<T>;
symmetricDifference<U>(other: ReadonlySetLike<U>): List<T | U>;
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
forEach(callbackfn: (value: T, value2: T, list: List<T>) => void, thisArg?: any): void;

@@ -20,0 +28,0 @@ has(value: T): boolean;

import { EventEmitter } from 'eventemitter3';
export class List extends EventEmitter {
[Symbol.toStringTag] = 'List';
constructor(values) {
super();
if (values) {
this.push(...values);
}
}
data = new Set();

@@ -77,2 +83,23 @@ array() {

}
union(other) {
return new List(this.data.union(other));
}
intersection(other) {
return new List(this.data.intersection(other));
}
difference(other) {
return new List(this.data.difference(other));
}
symmetricDifference(other) {
return new List(this.data.symmetricDifference(other));
}
isSubsetOf(other) {
return this.data.isSubsetOf(other);
}
isSupersetOf(other) {
return this.data.isSupersetOf(other);
}
isDisjointFrom(other) {
return this.data.isDisjointFrom(other);
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any

@@ -79,0 +106,0 @@ forEach(callbackfn, thisArg) {

2

package.json
{
"name": "utilium",
"version": "0.5.9",
"version": "0.5.10",
"description": "Typescript utilies",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -6,2 +6,9 @@ import { EventEmitter } from 'eventemitter3';

public constructor(values?: readonly T[] | Iterable<T> | null) {
super();
if (values) {
this.push(...values);
}
}
protected data = new Set<T>();

@@ -100,2 +107,30 @@

public union<U>(other: ReadonlySetLike<U>): List<T | U> {
return new List(this.data.union(other));
}
public intersection<U>(other: ReadonlySetLike<U>): List<T & U> {
return new List(this.data.intersection(other));
}
public difference<U>(other: ReadonlySetLike<U>): List<T> {
return new List(this.data.difference(other));
}
public symmetricDifference<U>(other: ReadonlySetLike<U>): List<T | U> {
return new List(this.data.symmetricDifference(other));
}
public isSubsetOf(other: ReadonlySetLike<unknown>): boolean {
return this.data.isSubsetOf(other);
}
public isSupersetOf(other: ReadonlySetLike<unknown>): boolean {
return this.data.isSupersetOf(other);
}
public isDisjointFrom(other: ReadonlySetLike<unknown>): boolean {
return this.data.isDisjointFrom(other);
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any

@@ -102,0 +137,0 @@ public forEach(callbackfn: (value: T, value2: T, list: List<T>) => void, thisArg?: any): void {

{
"compilerOptions": {
"lib": ["ES2023"],
"lib": ["ESNext"],
"module": "NodeNext",

@@ -5,0 +5,0 @@ "target": "ES2023",

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