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

@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.6.8 to 0.7.0

80

dist/main/map/immutable.js

@@ -73,41 +73,2 @@ "use strict";

};
HashMapEmpty.prototype.extendValues = function () {
return this;
};
HashMapEmpty.prototype.mergeAll = function (fillValue) {
var _a;
var sources = [];
for (var _i = 1; _i < arguments.length; _i++) {
sources[_i - 1] = arguments[_i];
}
return (_a = this.context).mergeAll.apply(_a, (0, tslib_1.__spreadArray)([fillValue,
this], (0, tslib_1.__read)(sources), false));
};
HashMapEmpty.prototype.mergeAllWith = function (fillValue, mergeFun) {
var _a;
var sources = [];
for (var _i = 2; _i < arguments.length; _i++) {
sources[_i - 2] = arguments[_i];
}
return (_a = this.context).mergeAllWith.apply(_a, (0, tslib_1.__spreadArray)([fillValue,
mergeFun,
this], (0, tslib_1.__read)(sources), false));
};
HashMapEmpty.prototype.merge = function () {
var _a;
var sources = [];
for (var _i = 0; _i < arguments.length; _i++) {
sources[_i] = arguments[_i];
}
return (_a = this.context).merge.apply(_a, (0, tslib_1.__spreadArray)([this], (0, tslib_1.__read)(sources), false));
};
HashMapEmpty.prototype.mergeWith = function (mergeFun) {
var _a;
var sources = [];
for (var _i = 1; _i < arguments.length; _i++) {
sources[_i - 1] = arguments[_i];
}
return (_a = this.context).mergeWith.apply(_a, (0, tslib_1.__spreadArray)([mergeFun,
this], (0, tslib_1.__read)(sources), false));
};
return HashMapEmpty;

@@ -195,3 +156,3 @@ }(collection_types_1.CustomBase.EmptyBase));

end: ')',
valueToString: function (entry) { return entry[0] + " -> " + entry[1]; },
valueToString: function (entry) { return "".concat(entry[0], " -> ").concat(entry[1]); },
});

@@ -205,41 +166,2 @@ };

};
HashMapNonEmptyBase.prototype.extendValues = function () {
return this;
};
HashMapNonEmptyBase.prototype.mergeAll = function (fillValue) {
var _a;
var sources = [];
for (var _i = 1; _i < arguments.length; _i++) {
sources[_i - 1] = arguments[_i];
}
return (_a = this.context).mergeAll.apply(_a, (0, tslib_1.__spreadArray)([fillValue,
this], (0, tslib_1.__read)(sources), false));
};
HashMapNonEmptyBase.prototype.mergeAllWith = function (fillValue, mergeFun) {
var _a;
var sources = [];
for (var _i = 2; _i < arguments.length; _i++) {
sources[_i - 2] = arguments[_i];
}
return (_a = this.context).mergeAllWith.apply(_a, (0, tslib_1.__spreadArray)([fillValue,
mergeFun,
this], (0, tslib_1.__read)(sources), false));
};
HashMapNonEmptyBase.prototype.merge = function () {
var _a;
var sources = [];
for (var _i = 0; _i < arguments.length; _i++) {
sources[_i] = arguments[_i];
}
return (_a = this.context).merge.apply(_a, (0, tslib_1.__spreadArray)([this], (0, tslib_1.__read)(sources), false));
};
HashMapNonEmptyBase.prototype.mergeWith = function (mergeFun) {
var _a;
var sources = [];
for (var _i = 1; _i < arguments.length; _i++) {
sources[_i - 1] = arguments[_i];
}
return (_a = this.context).mergeWith.apply(_a, (0, tslib_1.__spreadArray)([mergeFun,
this], (0, tslib_1.__read)(sources), false));
};
return HashMapNonEmptyBase;

@@ -246,0 +168,0 @@ }(collection_types_1.CustomBase.NonEmptyBase));

@@ -67,17 +67,2 @@ import { Arr, Entry, RimbuError, Token } from '@rimbu/base';

}
extendValues() {
return this;
}
mergeAll(fillValue, ...sources) {
return this.context.mergeAll(fillValue, this, ...sources);
}
mergeAllWith(fillValue, mergeFun, ...sources) {
return this.context.mergeAllWith(fillValue, mergeFun, this, ...sources);
}
merge(...sources) {
return this.context.merge(this, ...sources);
}
mergeWith(mergeFun, ...sources) {
return this.context.mergeWith(mergeFun, this, ...sources);
}
}

@@ -168,17 +153,2 @@ export class HashMapNonEmptyBase extends CustomBase.NonEmptyBase {

}
extendValues() {
return this;
}
mergeAll(fillValue, ...sources) {
return this.context.mergeAll(fillValue, this, ...sources);
}
mergeAllWith(fillValue, mergeFun, ...sources) {
return this.context.mergeAllWith(fillValue, mergeFun, this, ...sources);
}
merge(...sources) {
return this.context.merge(this, ...sources);
}
mergeWith(mergeFun, ...sources) {
return this.context.mergeWith(mergeFun, this, ...sources);
}
}

@@ -185,0 +155,0 @@ export class HashMapBlock extends HashMapNonEmptyBase {

@@ -29,17 +29,2 @@ import { Token } from '@rimbu/base';

toJSON(): ToJSON<(readonly [K, V])[]>;
extendValues(): any;
mergeAll<O, I extends readonly [unknown, ...unknown[]]>(fillValue: O, ...sources: {
[KT in keyof I]: StreamSource<readonly [K, I[KT]]>;
}): any;
mergeAllWith<R, O, I extends readonly [unknown, ...unknown[]]>(fillValue: O, mergeFun: (key: K, value: V | O, ...values: {
[KT in keyof I]: I[KT] | O;
}) => R, ...sources: {
[KT in keyof I]: StreamSource<readonly [K, I[KT]]>;
}): any;
merge<I extends readonly [unknown, ...unknown[]]>(...sources: {
[KT in keyof I]: StreamSource<readonly [K, I[KT]]>;
}): any;
mergeWith<R, K, I extends readonly [unknown, ...unknown[]]>(mergeFun: (key: K, ...values: I) => R, ...sources: {
[KT in keyof I]: StreamSource<readonly [K, I[KT]]>;
}): any;
}

@@ -72,17 +57,2 @@ export declare abstract class HashMapNonEmptyBase<K, V> extends CustomBase.NonEmptyBase<readonly [K, V]> implements HashMap.NonEmpty<K, V> {

toJSON(): ToJSON<(readonly [K, V])[]>;
extendValues(): any;
mergeAll<O, I extends readonly [unknown, ...unknown[]]>(fillValue: O, ...sources: {
[KT in keyof I]: StreamSource<readonly [K, I[KT]]>;
}): any;
mergeAllWith<R, O, I extends readonly [unknown, ...unknown[]]>(fillValue: O, mergeFun: (key: K, value: V | O, ...values: {
[KT in keyof I]: I[KT] | O;
}) => R, ...sources: {
[KT in keyof I]: StreamSource<readonly [K, I[KT]]>;
}): any;
merge<I extends readonly [unknown, ...unknown[]]>(...sources: {
[KT in keyof I]: StreamSource<readonly [K, I[KT]]>;
}): any;
mergeWith<R, K, I extends readonly [unknown, ...unknown[]]>(mergeFun: (key: K, ...values: I) => R, ...sources: {
[KT in keyof I]: StreamSource<readonly [K, I[KT]]>;
}): any;
}

@@ -89,0 +59,0 @@ export declare type MapEntrySet<K, V> = HashMapBlock<K, V> | HashMapCollision<K, V>;

8

dist/types/map/interface.d.ts

@@ -59,6 +59,6 @@ import type { CustomBase, RMap } from '@rimbu/collection-types';

interface Types extends RMap.Types {
normal: HashMap<this['_K'], this['_V']>;
nonEmpty: HashMap.NonEmpty<this['_K'], this['_V']>;
context: HashMap.Context<this['_K']>;
builder: HashMap.Builder<this['_K'], this['_V']>;
readonly normal: HashMap<this['_K'], this['_V']>;
readonly nonEmpty: HashMap.NonEmpty<this['_K'], this['_V']>;
readonly context: HashMap.Context<this['_K']>;
readonly builder: HashMap.Builder<this['_K'], this['_V']>;
}

@@ -65,0 +65,0 @@ }

@@ -54,6 +54,6 @@ import type { CustomBase } from '@rimbu/collection-types';

interface Types extends CustomBase.RSetBase.Types {
normal: HashSet<this['_T']>;
nonEmpty: HashSet.NonEmpty<this['_T']>;
context: HashSet.Context<this['_T']>;
builder: HashSet.Builder<this['_T']>;
readonly normal: HashSet<this['_T']>;
readonly nonEmpty: HashSet.NonEmpty<this['_T']>;
readonly context: HashSet.Context<this['_T']>;
readonly builder: HashSet.Builder<this['_T']>;
}

@@ -60,0 +60,0 @@ }

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

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

"dependencies": {
"@rimbu/base": "^0.6.7",
"@rimbu/collection-types": "^0.7.5",
"@rimbu/common": "^0.7.5",
"@rimbu/list": "^0.7.5",
"@rimbu/stream": "^0.7.5",
"@rimbu/base": "^0.7.0",
"@rimbu/collection-types": "^0.8.0",
"@rimbu/common": "^0.8.0",
"@rimbu/list": "^0.8.0",
"@rimbu/stream": "^0.8.0",
"tslib": "^2.3.1"

@@ -75,3 +75,3 @@ },

},
"gitHead": "20739fd0c0d5c565eeecd3e266dd51f893e8d67c"
"gitHead": "c321aa32b1c5fd8ca8b7fb1c26bd4f7bbf3ef70d"
}

@@ -60,15 +60,2 @@ <p align="center">

## Recommended `tsconfig.json` settings
Rimbu uses advanced and recursive typing, potentially making the TypeScript compiler quite slow in some cases, or causing infinite recursion. It is recommended to set the following values in the `tsconfig.json` file of your project:
```json
{
"compilerOptions": {
"skipLibCheck": true,
"noStrictGenericChecks": true
}
}
```
## Usage

@@ -75,0 +62,0 @@

@@ -103,51 +103,2 @@ import { Arr, Entry, RimbuError, Token } from '@rimbu/base';

}
extendValues(): any {
return this;
}
mergeAll<O, I extends readonly [unknown, ...unknown[]]>(
fillValue: O,
...sources: { [KT in keyof I]: StreamSource<readonly [K, I[KT]]> }
): any {
return this.context.mergeAll(
fillValue,
this,
...(sources as any as [any, ...any[]])
);
}
mergeAllWith<R, O, I extends readonly [unknown, ...unknown[]]>(
fillValue: O,
mergeFun: (
key: K,
value: V | O,
...values: { [KT in keyof I]: I[KT] | O }
) => R,
...sources: { [KT in keyof I]: StreamSource<readonly [K, I[KT]]> }
): any {
return this.context.mergeAllWith(
fillValue,
mergeFun as any,
this,
...(sources as any as [any, ...any[]])
);
}
merge<I extends readonly [unknown, ...unknown[]]>(
...sources: { [KT in keyof I]: StreamSource<readonly [K, I[KT]]> }
): any {
return this.context.merge(this, ...(sources as any as any[]));
}
mergeWith<R, K, I extends readonly [unknown, ...unknown[]]>(
mergeFun: (key: K, ...values: I) => R,
...sources: { [KT in keyof I]: StreamSource<readonly [K, I[KT]]> }
): any {
return this.context.mergeWith(
mergeFun as any,
this as any,
...(sources as any as [any, ...any[]])
);
}
}

@@ -267,3 +218,3 @@

toBuilder(): HashMap.Builder<K, V> {
return this.context.createBuilder(this);
return this.context.createBuilder<K, V>(this);
}

@@ -286,51 +237,2 @@

}
extendValues(): any {
return this;
}
mergeAll<O, I extends readonly [unknown, ...unknown[]]>(
fillValue: O,
...sources: { [KT in keyof I]: StreamSource<readonly [K, I[KT]]> }
): any {
return this.context.mergeAll(
fillValue,
this,
...(sources as any as [any, ...any[]])
);
}
mergeAllWith<R, O, I extends readonly [unknown, ...unknown[]]>(
fillValue: O,
mergeFun: (
key: K,
value: V | O,
...values: { [KT in keyof I]: I[KT] | O }
) => R,
...sources: { [KT in keyof I]: StreamSource<readonly [K, I[KT]]> }
): any {
return this.context.mergeAllWith(
fillValue,
mergeFun as any,
this,
...(sources as any as [any, ...any[]])
);
}
merge<I extends readonly [unknown, ...unknown[]]>(
...sources: { [KT in keyof I]: StreamSource<readonly [K, I[KT]]> }
): any {
return this.context.merge(this, ...(sources as any as any[]));
}
mergeWith<R, K, I extends readonly [unknown, ...unknown[]]>(
mergeFun: (key: K, ...values: I) => R,
...sources: { [KT in keyof I]: StreamSource<readonly [K, I[KT]]> }
): any {
return this.context.mergeWith(
mergeFun as any,
this as any,
...(sources as any as [any, ...any[]])
);
}
}

@@ -337,0 +239,0 @@

@@ -70,6 +70,6 @@ import type { CustomBase, RMap } from '@rimbu/collection-types';

export interface Types extends RMap.Types {
normal: HashMap<this['_K'], this['_V']>;
nonEmpty: HashMap.NonEmpty<this['_K'], this['_V']>;
context: HashMap.Context<this['_K']>;
builder: HashMap.Builder<this['_K'], this['_V']>;
readonly normal: HashMap<this['_K'], this['_V']>;
readonly nonEmpty: HashMap.NonEmpty<this['_K'], this['_V']>;
readonly context: HashMap.Context<this['_K']>;
readonly builder: HashMap.Builder<this['_K'], this['_V']>;
}

@@ -76,0 +76,0 @@ }

@@ -62,6 +62,6 @@ import type { CustomBase } from '@rimbu/collection-types';

export interface Types extends CustomBase.RSetBase.Types {
normal: HashSet<this['_T']>;
nonEmpty: HashSet.NonEmpty<this['_T']>;
context: HashSet.Context<this['_T']>;
builder: HashSet.Builder<this['_T']>;
readonly normal: HashSet<this['_T']>;
readonly nonEmpty: HashSet.NonEmpty<this['_T']>;
readonly context: HashSet.Context<this['_T']>;
readonly builder: HashSet.Builder<this['_T']>;
}

@@ -68,0 +68,0 @@ }

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