Socket
Socket
Sign inDemoInstall

@rimbu/hashed

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rimbu/hashed - npm Package Compare versions

Comparing version 0.8.12 to 0.8.13

52

dist/main/common/hasher.js

@@ -24,3 +24,3 @@ "use strict";

var maxSteps = 1 << maxStepBits;
return {
return Object.freeze({
isValid: function (obj) {

@@ -39,3 +39,3 @@ return typeof obj === 'string';

},
};
});
}

@@ -55,3 +55,3 @@ var _stringHasher = createStringHasher(MAX_STEP_BITS);

Hasher.stringHasher = stringHasher;
var _anyToStringHasher = {
var _anyToStringHasher = Object.freeze({
isValid: function (obj) {

@@ -63,3 +63,3 @@ return true;

},
};
});
/**

@@ -80,3 +80,3 @@ * Returns a Hasher instance that hashes the string representation of any value

Hasher.anyToStringHasher = anyToStringHasher;
var _anyJsonStringHasher = {
var _anyJsonStringHasher = Object.freeze({
isValid: function (obj) {

@@ -88,3 +88,3 @@ return true;

},
};
});
/**

@@ -106,3 +106,3 @@ * Returns a Hasher instance that hashes any value by hashing the string resulting from

var maxSteps = 1 << maxStepBits;
return {
return Object.freeze({
isValid: function (obj) {

@@ -122,3 +122,3 @@ return typeof obj === 'string';

},
};
});
}

@@ -132,3 +132,3 @@ var _stringCaseInsensitiveHasher = createStringCaseInsensitiveHasher(MAX_STEP_BITS);

var maxSteps = 1 << maxStepBits;
return {
return Object.freeze({
isValid: function (obj) {

@@ -148,3 +148,3 @@ return Array.isArray(obj);

},
};
});
}

@@ -178,3 +178,3 @@ var _arrayAnyHasher = createArrayHasher(defaultHasher(), MAX_STEP_BITS);

var maxSteps = 1 << maxStepBits;
return {
return Object.freeze({
isValid: function (obj) {

@@ -217,3 +217,3 @@ return (typeof obj === 'object' && obj !== null && Symbol.iterator in obj);

},
};
});
}

@@ -245,3 +245,3 @@ var _streamSourceAnyHasher = createStreamSourceHasher(defaultHasher(), MAX_STEP_BITS);

var MAX_HASH = Math.pow(2, 31) - 1;
var _numberHasher = {
var _numberHasher = Object.freeze({
isValid: function (obj) {

@@ -266,3 +266,3 @@ return typeof obj === 'number';

},
};
});
/**

@@ -283,3 +283,3 @@ * Returns a Hasher instance that hashes numbers, including 'special' values like NaN and infinities.

Hasher.numberHasher = numberHasher;
var _booleanHasher = {
var _booleanHasher = Object.freeze({
isValid: function (obj) {

@@ -291,3 +291,3 @@ return typeof obj === 'boolean';

},
};
});
/**

@@ -306,3 +306,3 @@ * Returns a Hasher instance that hashes booleans.

Hasher.booleanHasher = booleanHasher;
var _bigintHasher = {
var _bigintHasher = Object.freeze({
isValid: function (obj) {

@@ -312,3 +312,3 @@ return typeof obj === 'bigint';

hash: _anyToStringHasher.hash,
};
});
/**

@@ -347,3 +347,3 @@ * Returns a Hasher instance that hashes bigints.

if (valueHasher === void 0) { valueHasher = anyFlatHasher(); }
return {
return Object.freeze({
isValid: function (obj) {

@@ -355,3 +355,3 @@ return obj instanceof cls;

},
};
});
}

@@ -399,3 +399,3 @@ Hasher.createValueOfHasher = createValueOfHasher;

function createObjectHasher(keyHasher, valueHasher) {
return {
return Object.freeze({
isValid: function (obj) {

@@ -417,3 +417,3 @@ return typeof obj === 'object';

},
};
});
}

@@ -477,3 +477,3 @@ var _objectShallowHasher = createObjectHasher(anyFlatHasher(), anyFlatHasher());

if (maxStepBits === void 0) { maxStepBits = MAX_STEP_BITS; }
return {
return Object.freeze({
isValid: function (obj) {

@@ -527,3 +527,3 @@ return true;

},
};
});
}

@@ -588,3 +588,3 @@ /**

if (hasher === void 0) { hasher = anyShallowHasher(); }
return {
return Object.freeze({
isValid: function (obj) {

@@ -599,3 +599,3 @@ return (Array.isArray(obj) &&

},
};
});
}

@@ -602,0 +602,0 @@ Hasher.tupleSymmetric = tupleSymmetric;

@@ -25,4 +25,4 @@ "use strict";

_this.maxDepth = Math.ceil(32 / blockSizeBits);
_this._empty = new map_custom_2.HashMapEmpty(_this);
_this._emptyBlock = new map_custom_2.HashMapBlock(_this, null, null, 0, 0);
_this._empty = Object.freeze(new map_custom_2.HashMapEmpty(_this));
_this._emptyBlock = Object.freeze(new map_custom_2.HashMapBlock(_this, null, null, 0, 0));
return _this;

@@ -66,5 +66,5 @@ }

var _a, _b, _c, _d;
return new HashMapContext((_a = options === null || options === void 0 ? void 0 : options.hasher) !== null && _a !== void 0 ? _a : common_2.Hasher.defaultHasher(), (_b = options === null || options === void 0 ? void 0 : options.eq) !== null && _b !== void 0 ? _b : common_1.Eq.defaultEq(), (_c = options === null || options === void 0 ? void 0 : options.blockSizeBits) !== null && _c !== void 0 ? _c : 5, (_d = options === null || options === void 0 ? void 0 : options.listContext) !== null && _d !== void 0 ? _d : list_1.List.defaultContext());
return Object.freeze(new HashMapContext((_a = options === null || options === void 0 ? void 0 : options.hasher) !== null && _a !== void 0 ? _a : common_2.Hasher.defaultHasher(), (_b = options === null || options === void 0 ? void 0 : options.eq) !== null && _b !== void 0 ? _b : common_1.Eq.defaultEq(), (_c = options === null || options === void 0 ? void 0 : options.blockSizeBits) !== null && _c !== void 0 ? _c : 5, (_d = options === null || options === void 0 ? void 0 : options.listContext) !== null && _d !== void 0 ? _d : list_1.List.defaultContext()));
}
exports.createHashMapContext = createHashMapContext;
//# sourceMappingURL=context.js.map

@@ -7,5 +7,5 @@ "use strict";

var _defaultContext = (0, map_custom_1.createHashMapContext)();
exports.HashMap = tslib_1.__assign(tslib_1.__assign({}, _defaultContext), { createContext: map_custom_1.createHashMapContext, defaultContext: function () {
exports.HashMap = Object.freeze(tslib_1.__assign(tslib_1.__assign({}, _defaultContext), { createContext: map_custom_1.createHashMapContext, defaultContext: function () {
return _defaultContext;
} });
} }));
//# sourceMappingURL=index.js.map

@@ -25,4 +25,4 @@ "use strict";

_this.maxDepth = Math.ceil(32 / blockSizeBits);
_this._empty = new set_custom_2.HashSetEmpty(_this);
_this._emptyBlock = new set_custom_2.HashSetBlock(_this, null, null, 0, 0);
_this._empty = Object.freeze(new set_custom_2.HashSetEmpty(_this));
_this._emptyBlock = Object.freeze(new set_custom_2.HashSetBlock(_this, null, null, 0, 0));
return _this;

@@ -69,5 +69,5 @@ }

var _a, _b, _c, _d;
return new HashSetContext((_a = options === null || options === void 0 ? void 0 : options.hasher) !== null && _a !== void 0 ? _a : common_2.Hasher.defaultHasher(), (_b = options === null || options === void 0 ? void 0 : options.eq) !== null && _b !== void 0 ? _b : common_1.Eq.defaultEq(), (_c = options === null || options === void 0 ? void 0 : options.blockSizeBits) !== null && _c !== void 0 ? _c : 5, (_d = options === null || options === void 0 ? void 0 : options.listContext) !== null && _d !== void 0 ? _d : list_1.List.defaultContext());
return Object.freeze(new HashSetContext((_a = options === null || options === void 0 ? void 0 : options.hasher) !== null && _a !== void 0 ? _a : common_2.Hasher.defaultHasher(), (_b = options === null || options === void 0 ? void 0 : options.eq) !== null && _b !== void 0 ? _b : common_1.Eq.defaultEq(), (_c = options === null || options === void 0 ? void 0 : options.blockSizeBits) !== null && _c !== void 0 ? _c : 5, (_d = options === null || options === void 0 ? void 0 : options.listContext) !== null && _d !== void 0 ? _d : list_1.List.defaultContext()));
}
exports.createHashSetContext = createHashSetContext;
//# sourceMappingURL=context.js.map

@@ -7,5 +7,5 @@ "use strict";

var _defaultContext = (0, set_custom_1.createHashSetContext)();
exports.HashSet = tslib_1.__assign(tslib_1.__assign({}, _defaultContext), { createContext: set_custom_1.createHashSetContext, defaultContext: function () {
exports.HashSet = Object.freeze(tslib_1.__assign(tslib_1.__assign({}, _defaultContext), { createContext: set_custom_1.createHashSetContext, defaultContext: function () {
return _defaultContext;
} });
} }));
//# sourceMappingURL=index.js.map

@@ -21,3 +21,3 @@ import { Eq } from '@rimbu/common';

const maxSteps = 1 << maxStepBits;
return {
return Object.freeze({
isValid(obj) {

@@ -36,3 +36,3 @@ return typeof obj === 'string';

},
};
});
}

@@ -52,3 +52,3 @@ const _stringHasher = createStringHasher(MAX_STEP_BITS);

Hasher.stringHasher = stringHasher;
const _anyToStringHasher = {
const _anyToStringHasher = Object.freeze({
isValid(obj) {

@@ -60,3 +60,3 @@ return true;

},
};
});
/**

@@ -77,3 +77,3 @@ * Returns a Hasher instance that hashes the string representation of any value

Hasher.anyToStringHasher = anyToStringHasher;
const _anyJsonStringHasher = {
const _anyJsonStringHasher = Object.freeze({
isValid(obj) {

@@ -85,3 +85,3 @@ return true;

},
};
});
/**

@@ -103,3 +103,3 @@ * Returns a Hasher instance that hashes any value by hashing the string resulting from

const maxSteps = 1 << maxStepBits;
return {
return Object.freeze({
isValid(obj) {

@@ -119,3 +119,3 @@ return typeof obj === 'string';

},
};
});
}

@@ -129,3 +129,3 @@ const _stringCaseInsensitiveHasher = createStringCaseInsensitiveHasher(MAX_STEP_BITS);

const maxSteps = 1 << maxStepBits;
return {
return Object.freeze({
isValid(obj) {

@@ -145,3 +145,3 @@ return Array.isArray(obj);

},
};
});
}

@@ -173,3 +173,3 @@ const _arrayAnyHasher = createArrayHasher(defaultHasher(), MAX_STEP_BITS);

const maxSteps = 1 << maxStepBits;
return {
return Object.freeze({
isValid(obj) {

@@ -212,3 +212,3 @@ return (typeof obj === 'object' && obj !== null && Symbol.iterator in obj);

},
};
});
}

@@ -240,3 +240,3 @@ const _streamSourceAnyHasher = createStreamSourceHasher(defaultHasher(), MAX_STEP_BITS);

const MAX_HASH = Math.pow(2, 31) - 1;
const _numberHasher = {
const _numberHasher = Object.freeze({
isValid(obj) {

@@ -261,3 +261,3 @@ return typeof obj === 'number';

},
};
});
/**

@@ -278,3 +278,3 @@ * Returns a Hasher instance that hashes numbers, including 'special' values like NaN and infinities.

Hasher.numberHasher = numberHasher;
const _booleanHasher = {
const _booleanHasher = Object.freeze({
isValid(obj) {

@@ -286,3 +286,3 @@ return typeof obj === 'boolean';

},
};
});
/**

@@ -301,3 +301,3 @@ * Returns a Hasher instance that hashes booleans.

Hasher.booleanHasher = booleanHasher;
const _bigintHasher = {
const _bigintHasher = Object.freeze({
isValid(obj) {

@@ -307,3 +307,3 @@ return typeof obj === 'bigint';

hash: _anyToStringHasher.hash,
};
});
/**

@@ -341,3 +341,3 @@ * Returns a Hasher instance that hashes bigints.

function createValueOfHasher(cls, valueHasher = anyFlatHasher()) {
return {
return Object.freeze({
isValid(obj) {

@@ -349,3 +349,3 @@ return obj instanceof cls;

},
};
});
}

@@ -393,3 +393,3 @@ Hasher.createValueOfHasher = createValueOfHasher;

function createObjectHasher(keyHasher, valueHasher) {
return {
return Object.freeze({
isValid(obj) {

@@ -411,3 +411,3 @@ return typeof obj === 'object';

},
};
});
}

@@ -470,3 +470,3 @@ const _objectShallowHasher = createObjectHasher(anyFlatHasher(), anyFlatHasher());

function createAnyHasher(mode, maxStepBits = MAX_STEP_BITS) {
return {
return Object.freeze({
isValid(obj) {

@@ -520,3 +520,3 @@ return true;

},
};
});
}

@@ -580,3 +580,3 @@ /**

function tupleSymmetric(hasher = anyShallowHasher()) {
return {
return Object.freeze({
isValid(obj) {

@@ -591,3 +591,3 @@ return (Array.isArray(obj) &&

},
};
});
}

@@ -594,0 +594,0 @@ Hasher.tupleSymmetric = tupleSymmetric;

@@ -20,4 +20,4 @@ import { RMapBase } from '@rimbu/collection-types/map-custom';

this.maxDepth = Math.ceil(32 / blockSizeBits);
this._empty = new HashMapEmpty(this);
this._emptyBlock = new HashMapBlock(this, null, null, 0, 0);
this._empty = Object.freeze(new HashMapEmpty(this));
this._emptyBlock = Object.freeze(new HashMapBlock(this, null, null, 0, 0));
}

@@ -58,4 +58,4 @@ hash(value) {

var _a, _b, _c, _d;
return new HashMapContext((_a = options === null || options === void 0 ? void 0 : options.hasher) !== null && _a !== void 0 ? _a : Hasher.defaultHasher(), (_b = options === null || options === void 0 ? void 0 : options.eq) !== null && _b !== void 0 ? _b : Eq.defaultEq(), (_c = options === null || options === void 0 ? void 0 : options.blockSizeBits) !== null && _c !== void 0 ? _c : 5, (_d = options === null || options === void 0 ? void 0 : options.listContext) !== null && _d !== void 0 ? _d : List.defaultContext());
return Object.freeze(new HashMapContext((_a = options === null || options === void 0 ? void 0 : options.hasher) !== null && _a !== void 0 ? _a : Hasher.defaultHasher(), (_b = options === null || options === void 0 ? void 0 : options.eq) !== null && _b !== void 0 ? _b : Eq.defaultEq(), (_c = options === null || options === void 0 ? void 0 : options.blockSizeBits) !== null && _c !== void 0 ? _c : 5, (_d = options === null || options === void 0 ? void 0 : options.listContext) !== null && _d !== void 0 ? _d : List.defaultContext()));
}
//# sourceMappingURL=context.js.map
import { createHashMapContext } from '@rimbu/hashed/map-custom';
const _defaultContext = createHashMapContext();
export const HashMap = Object.assign(Object.assign({}, _defaultContext), { createContext: createHashMapContext, defaultContext() {
export const HashMap = Object.freeze(Object.assign(Object.assign({}, _defaultContext), { createContext: createHashMapContext, defaultContext() {
return _defaultContext;
} });
} }));
//# sourceMappingURL=index.js.map

@@ -20,4 +20,4 @@ import { RSetBase } from '@rimbu/collection-types/set-custom';

this.maxDepth = Math.ceil(32 / blockSizeBits);
this._empty = new HashSetEmpty(this);
this._emptyBlock = new HashSetBlock(this, null, null, 0, 0);
this._empty = Object.freeze(new HashSetEmpty(this));
this._emptyBlock = Object.freeze(new HashSetBlock(this, null, null, 0, 0));
}

@@ -61,4 +61,4 @@ isNonEmptyInstance(source) {

var _a, _b, _c, _d;
return new HashSetContext((_a = options === null || options === void 0 ? void 0 : options.hasher) !== null && _a !== void 0 ? _a : Hasher.defaultHasher(), (_b = options === null || options === void 0 ? void 0 : options.eq) !== null && _b !== void 0 ? _b : Eq.defaultEq(), (_c = options === null || options === void 0 ? void 0 : options.blockSizeBits) !== null && _c !== void 0 ? _c : 5, (_d = options === null || options === void 0 ? void 0 : options.listContext) !== null && _d !== void 0 ? _d : List.defaultContext());
return Object.freeze(new HashSetContext((_a = options === null || options === void 0 ? void 0 : options.hasher) !== null && _a !== void 0 ? _a : Hasher.defaultHasher(), (_b = options === null || options === void 0 ? void 0 : options.eq) !== null && _b !== void 0 ? _b : Eq.defaultEq(), (_c = options === null || options === void 0 ? void 0 : options.blockSizeBits) !== null && _c !== void 0 ? _c : 5, (_d = options === null || options === void 0 ? void 0 : options.listContext) !== null && _d !== void 0 ? _d : List.defaultContext()));
}
//# sourceMappingURL=context.js.map
import { createHashSetContext } from '@rimbu/hashed/set-custom';
const _defaultContext = createHashSetContext();
export const HashSet = Object.assign(Object.assign({}, _defaultContext), { createContext: createHashSetContext, defaultContext() {
export const HashSet = Object.freeze(Object.assign(Object.assign({}, _defaultContext), { createContext: createHashSetContext, defaultContext() {
return _defaultContext;
} });
} }));
//# sourceMappingURL=index.js.map

@@ -23,3 +23,3 @@ import { RMapBase } from '@rimbu/collection-types/map-custom';

isNonEmptyInstance(source: any): source is any;
builder: <K extends UK, V>() => HashMap.Builder<K, V>;
readonly builder: <K extends UK, V>() => HashMap.Builder<K, V>;
createBuilder<K extends UK, V>(source?: HashMap.NonEmpty<K, V>): HashMap.Builder<K, V>;

@@ -26,0 +26,0 @@ isValidKey(key: unknown): key is UK;

@@ -26,3 +26,3 @@ import { RSetBase } from '@rimbu/collection-types/set-custom';

isValidValue(value: unknown): value is UT;
builder: <T extends UT>() => HashSet.Builder<T>;
readonly builder: <T extends UT>() => HashSet.Builder<T>;
createBuilder<T extends UT>(source?: HashSet.NonEmpty<T>): HashSet.Builder<T>;

@@ -29,0 +29,0 @@ block(entries: readonly UT[] | null, entrySets: SetEntrySet<UT>[] | null, size: number, level: number): HashSetBlock<UT>;

{
"name": "@rimbu/hashed",
"version": "0.8.12",
"version": "0.8.13",
"description": "Immutable HashMap and HashSet implementations for TypeScript",

@@ -72,7 +72,7 @@ "keywords": [

"dependencies": {
"@rimbu/base": "^0.8.2",
"@rimbu/collection-types": "^0.9.10",
"@rimbu/common": "^0.9.2",
"@rimbu/list": "^0.10.12",
"@rimbu/stream": "^0.10.10",
"@rimbu/base": "^0.9.0",
"@rimbu/collection-types": "^0.9.11",
"@rimbu/common": "^0.9.3",
"@rimbu/list": "^0.10.13",
"@rimbu/stream": "^0.10.11",
"tslib": "^2.4.0"

@@ -94,3 +94,3 @@ },

},
"gitHead": "33dd7ca935f19f513586834a2ce1b1f886352ae7"
"gitHead": "4efaf8c469d606381517984436383fd6b1b61ec0"
}

@@ -63,3 +63,3 @@ import { Eq } from '@rimbu/common';

return {
return Object.freeze({
isValid(obj: unknown): obj is string {

@@ -81,3 +81,3 @@ return typeof obj === 'string';

},
};
});
}

@@ -99,3 +99,3 @@

const _anyToStringHasher: Hasher<any> = {
const _anyToStringHasher: Hasher<any> = Object.freeze({
isValid(obj: unknown): obj is any {

@@ -107,3 +107,3 @@ return true;

},
};
});

@@ -125,3 +125,3 @@ /**

const _anyJsonStringHasher: Hasher<any> = {
const _anyJsonStringHasher: Hasher<any> = Object.freeze({
isValid(obj: unknown): obj is any {

@@ -133,3 +133,3 @@ return true;

},
};
});

@@ -155,3 +155,3 @@ /**

return {
return Object.freeze({
isValid(obj: unknown): obj is string {

@@ -174,3 +174,3 @@ return typeof obj === 'string';

},
};
});
}

@@ -191,3 +191,3 @@

return {
return Object.freeze({
isValid(obj: unknown): obj is readonly T[] {

@@ -210,3 +210,3 @@ return Array.isArray(obj);

},
};
});
}

@@ -252,3 +252,3 @@

return {
return Object.freeze({
isValid(obj: unknown): obj is StreamSource<T> {

@@ -307,3 +307,3 @@ return (

},
};
});
}

@@ -342,3 +342,3 @@

const _numberHasher: Hasher<number> = {
const _numberHasher: Hasher<number> = Object.freeze({
isValid(obj: unknown): obj is number {

@@ -364,3 +364,3 @@ return typeof obj === 'number';

},
};
});

@@ -382,3 +382,3 @@ /**

const _booleanHasher: Hasher<boolean> = {
const _booleanHasher: Hasher<boolean> = Object.freeze({
isValid(obj: unknown): obj is boolean {

@@ -390,3 +390,3 @@ return typeof obj === 'boolean';

},
};
});

@@ -406,3 +406,3 @@ /**

const _bigintHasher: Hasher<bigint> = {
const _bigintHasher: Hasher<bigint> = Object.freeze({
isValid(obj: unknown): obj is bigint {

@@ -412,3 +412,3 @@ return typeof obj === 'bigint';

hash: _anyToStringHasher.hash,
};
});

@@ -452,3 +452,3 @@ /**

): Hasher<T> {
return {
return Object.freeze({
isValid(obj): obj is T {

@@ -460,3 +460,3 @@ return obj instanceof cls;

},
};
});
}

@@ -525,3 +525,3 @@

): Hasher<Record<any, any>> {
return {
return Object.freeze({
isValid(obj): obj is Record<any, any> {

@@ -547,3 +547,3 @@ return typeof obj === 'object';

},
};
});
}

@@ -630,3 +630,3 @@

): Hasher<any> {
return {
return Object.freeze({
isValid(obj): obj is any {

@@ -692,3 +692,3 @@ return true;

},
};
});
}

@@ -755,3 +755,3 @@

): Hasher<readonly [T, T]> {
return {
return Object.freeze({
isValid(obj: unknown): obj is readonly [T, T] {

@@ -768,4 +768,4 @@ return (

},
};
});
}
}

@@ -43,4 +43,4 @@ import { RMapBase } from '@rimbu/collection-types/map-custom';

this._empty = new HashMapEmpty<any, any>(this);
this._emptyBlock = new HashMapBlock(this, null, null, 0, 0);
this._empty = Object.freeze(new HashMapEmpty<any, any>(this));
this._emptyBlock = Object.freeze(new HashMapBlock(this, null, null, 0, 0));
}

@@ -63,3 +63,3 @@

builder = <K extends UK, V>(): HashMap.Builder<K, V> => {
readonly builder = <K extends UK, V>(): HashMap.Builder<K, V> => {
return new HashMapBlockBuilder<K, V>(this as any);

@@ -117,8 +117,10 @@ };

}): HashMap.Context<UK> {
return new HashMapContext(
options?.hasher ?? Hasher.defaultHasher(),
options?.eq ?? Eq.defaultEq(),
options?.blockSizeBits ?? 5,
options?.listContext ?? List.defaultContext()
return Object.freeze(
new HashMapContext(
options?.hasher ?? Hasher.defaultHasher(),
options?.eq ?? Eq.defaultEq(),
options?.blockSizeBits ?? 5,
options?.listContext ?? List.defaultContext()
)
);
}

@@ -93,3 +93,3 @@ import type { RMap } from '@rimbu/collection-types';

export const HashMap: HashMapCreators = {
export const HashMap: HashMapCreators = Object.freeze({
..._defaultContext,

@@ -100,2 +100,2 @@ createContext: createHashMapContext,

},
};
});

@@ -44,4 +44,4 @@ import { RSetBase } from '@rimbu/collection-types/set-custom';

this._empty = new HashSetEmpty<any>(this);
this._emptyBlock = new HashSetBlock(this, null, null, 0, 0);
this._empty = Object.freeze(new HashSetEmpty<any>(this));
this._emptyBlock = Object.freeze(new HashSetBlock(this, null, null, 0, 0));
}

@@ -72,3 +72,3 @@

builder = <T extends UT>(): HashSet.Builder<T> => {
readonly builder = <T extends UT>(): HashSet.Builder<T> => {
return new HashSetBlockBuilder<T>(this as any);

@@ -127,8 +127,10 @@ };

}): HashSet.Context<UT> {
return new HashSetContext(
options?.hasher ?? Hasher.defaultHasher(),
options?.eq ?? Eq.defaultEq(),
options?.blockSizeBits ?? 5,
options?.listContext ?? List.defaultContext()
return Object.freeze(
new HashSetContext(
options?.hasher ?? Hasher.defaultHasher(),
options?.eq ?? Eq.defaultEq(),
options?.blockSizeBits ?? 5,
options?.listContext ?? List.defaultContext()
)
);
}

@@ -84,3 +84,3 @@ import type { RSetBase } from '@rimbu/collection-types/set-custom';

export const HashSet: HashSetCreators = {
export const HashSet: HashSetCreators = Object.freeze({
..._defaultContext,

@@ -91,2 +91,2 @@ createContext: createHashSetContext,

},
};
});

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