New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

collection-utils

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

collection-utils - npm Package Compare versions

Comparing version

to
1.0.0

8

dist/index.d.ts

@@ -7,3 +7,5 @@ export declare const hashCodeInit = 17;

export declare function definedMapWithDefault<T, U>(x: T | undefined, theDefault: U, f: (x: T) => U): U;
export declare function hasOwnProperty(obj: object, name: string): boolean;
export declare function hasOwnProperty<T extends string>(obj: unknown, name: T): obj is {
[P in T]: unknown;
};
export declare function iterableFind<T>(it: Iterable<T>, p: (v: T) => boolean): T | undefined;

@@ -70,3 +72,3 @@ export declare function iterableEvery<T>(it: Iterable<T>, p: (v: T) => boolean): boolean;

}
export declare function areEqual(a: any, b: any): boolean;
export declare function hashCodeOf(x: any): number;
export declare function areEqual(a: unknown, b: unknown): boolean;
export declare function hashCodeOf(x: unknown): number;

@@ -45,2 +45,4 @@ "use strict";

function hasOwnProperty(obj, name) {
if (obj === undefined || obj === null)
return false;
return Object.prototype.hasOwnProperty.call(obj, name);

@@ -507,3 +509,6 @@ }

}
if (typeof a.equals === "function" && typeof b.equals === "function") {
if (hasOwnProperty(a, "equals") &&
typeof a.equals === "function" &&
hasOwnProperty(b, "equals") &&
typeof b.equals === "function") {
return a.equals(b);

@@ -555,4 +560,5 @@ }

return (h + 2) | 0;
if (typeof x.hashCode === "function")
if (hasOwnProperty(x, "hashCode") && typeof x.hashCode === "function") {
return x.hashCode();
}
if (x instanceof Set) {

@@ -559,0 +565,0 @@ for (const y of x) {

{
"name": "collection-utils",
"version": "0.0.15",
"version": "1.0.0",
"description": "Utility functions for Javascript collections",

@@ -5,0 +5,0 @@ "repository": "https://github.com/quicktype/collection-utils",

Sorry, the diff of this file is not supported yet