@rimbu/sorted
Advanced tools
Comparing version 0.9.1 to 0.9.2
@@ -9,2 +9,3 @@ "use strict"; | ||
var stream_1 = require("@rimbu/stream"); | ||
var custom_1 = require("@rimbu/stream/custom"); | ||
var SortedMapBuilder = /** @class */ (function (_super) { | ||
@@ -63,3 +64,3 @@ (0, tslib_1.__extends)(SortedMapBuilder, _super); | ||
_this.checkLock(); | ||
if (stream_1.StreamSource.isEmptyInstance(keys)) | ||
if ((0, custom_1.isEmptyStreamSourceInstance)(keys)) | ||
return false; | ||
@@ -66,0 +67,0 @@ var notFound = Symbol(); |
@@ -9,2 +9,3 @@ "use strict"; | ||
var stream_1 = require("@rimbu/stream"); | ||
var custom_1 = require("@rimbu/stream/custom"); | ||
var SortedMapEmpty = /** @class */ (function (_super) { | ||
@@ -183,3 +184,3 @@ (0, tslib_1.__extends)(SortedMapEmpty, _super); | ||
SortedMapNode.prototype.addEntries = function (entries) { | ||
if (stream_1.StreamSource.isEmptyInstance(entries)) | ||
if ((0, custom_1.isEmptyStreamSourceInstance)(entries)) | ||
return this; | ||
@@ -211,3 +212,3 @@ var builder = this.toBuilder(); | ||
SortedMapNode.prototype.removeKeys = function (keys) { | ||
if (stream_1.StreamSource.isEmptyInstance(keys)) | ||
if ((0, custom_1.isEmptyStreamSourceInstance)(keys)) | ||
return this; | ||
@@ -214,0 +215,0 @@ var builder = this.toBuilder(); |
@@ -9,2 +9,3 @@ "use strict"; | ||
var stream_1 = require("@rimbu/stream"); | ||
var custom_1 = require("@rimbu/stream/custom"); | ||
var SortedSetEmpty = /** @class */ (function (_super) { | ||
@@ -114,3 +115,3 @@ (0, tslib_1.__extends)(SortedSetEmpty, _super); | ||
SortedSetNode.prototype.addAll = function (values) { | ||
if (stream_1.StreamSource.isEmptyInstance(values)) | ||
if ((0, custom_1.isEmptyStreamSourceInstance)(values)) | ||
return this; | ||
@@ -127,3 +128,3 @@ var builder = this.toBuilder(); | ||
SortedSetNode.prototype.removeAll = function (values) { | ||
if (stream_1.StreamSource.isEmptyInstance(values)) | ||
if ((0, custom_1.isEmptyStreamSourceInstance)(values)) | ||
return this; | ||
@@ -178,3 +179,3 @@ var builder = this.toBuilder(); | ||
return this; | ||
if (stream_1.StreamSource.isEmptyInstance(other)) | ||
if ((0, custom_1.isEmptyStreamSourceInstance)(other)) | ||
return this; | ||
@@ -188,3 +189,3 @@ var builder = this.toBuilder(); | ||
return this.context.empty(); | ||
if (stream_1.StreamSource.isEmptyInstance(other)) | ||
if ((0, custom_1.isEmptyStreamSourceInstance)(other)) | ||
return this; | ||
@@ -198,3 +199,3 @@ var builder = this.toBuilder(); | ||
return this; | ||
if (stream_1.StreamSource.isEmptyInstance(other)) | ||
if ((0, custom_1.isEmptyStreamSourceInstance)(other)) | ||
return this.context.empty(); | ||
@@ -236,3 +237,3 @@ var builder = this.context.builder(); | ||
return this.context.empty(); | ||
if (stream_1.StreamSource.isEmptyInstance(other)) | ||
if ((0, custom_1.isEmptyStreamSourceInstance)(other)) | ||
return this; | ||
@@ -239,0 +240,0 @@ var builder = this.toBuilder(); |
import { Token } from '@rimbu/base'; | ||
import { OptLazy, OptLazyOr, Update } from '@rimbu/common'; | ||
import { SortedBuilder, SortedIndex, SortedMapEmpty, SortedMapInner, SortedMapLeaf, } from '@rimbu/sorted/map-custom'; | ||
import { Stream, StreamSource } from '@rimbu/stream'; | ||
import { Stream } from '@rimbu/stream'; | ||
import { isEmptyStreamSourceInstance } from '@rimbu/stream/custom'; | ||
export class SortedMapBuilder extends SortedBuilder { | ||
@@ -57,3 +58,3 @@ constructor(context, source, _entries, _children, size) { | ||
this.checkLock(); | ||
if (StreamSource.isEmptyInstance(keys)) | ||
if (isEmptyStreamSourceInstance(keys)) | ||
return false; | ||
@@ -60,0 +61,0 @@ const notFound = Symbol(); |
import { Arr, Entry, RimbuError, Token } from '@rimbu/base'; | ||
import { IndexRange, OptLazy, OptLazyOr, Range, TraverseState, Update, } from '@rimbu/common'; | ||
import { innerDeleteMax, innerDeleteMin, innerDropInternal, innerGetAtIndex, innerMutateGetFromLeft, innerMutateGetFromRight, innerMutateGiveToLeft, innerMutateGiveToRight, innerMutateJoinLeft, innerMutateJoinRight, innerMutateSplitRight, innerNormalizeDownsizeChild, innerNormalizeIncreaseChild, innerStreamSliceIndex, innerTakeInternal, leafDeleteMax, leafDeleteMin, leafMutateGetFromLeft, leafMutateGetFromRight, leafMutateGiveToLeft, leafMutateGiveToRight, leafMutateJoinLeft, leafMutateJoinRight, leafMutateSplitRight, SortedEmpty, SortedIndex, SortedNonEmptyBase, } from '@rimbu/sorted/map-custom'; | ||
import { Stream, StreamSource } from '@rimbu/stream'; | ||
import { Stream } from '@rimbu/stream'; | ||
import { isEmptyStreamSourceInstance } from '@rimbu/stream/custom'; | ||
export class SortedMapEmpty extends SortedEmpty { | ||
@@ -170,3 +171,3 @@ constructor(context) { | ||
addEntries(entries) { | ||
if (StreamSource.isEmptyInstance(entries)) | ||
if (isEmptyStreamSourceInstance(entries)) | ||
return this; | ||
@@ -198,3 +199,3 @@ const builder = this.toBuilder(); | ||
removeKeys(keys) { | ||
if (StreamSource.isEmptyInstance(keys)) | ||
if (isEmptyStreamSourceInstance(keys)) | ||
return this; | ||
@@ -201,0 +202,0 @@ const builder = this.toBuilder(); |
import { Arr, RimbuError } from '@rimbu/base'; | ||
import { IndexRange, OptLazy, Range, TraverseState, } from '@rimbu/common'; | ||
import { innerDeleteMax, innerDeleteMin, innerDropInternal, innerGetAtIndex, innerMutateGetFromLeft, innerMutateGetFromRight, innerMutateGiveToLeft, innerMutateGiveToRight, innerMutateJoinLeft, innerMutateJoinRight, innerMutateSplitRight, innerNormalizeDownsizeChild, innerNormalizeIncreaseChild, innerStreamSliceIndex, innerTakeInternal, leafDeleteMax, leafDeleteMin, leafMutateGetFromLeft, leafMutateGetFromRight, leafMutateGiveToLeft, leafMutateGiveToRight, leafMutateJoinLeft, leafMutateJoinRight, leafMutateSplitRight, SortedEmpty, SortedIndex, SortedNonEmptyBase, } from '@rimbu/sorted/set-custom'; | ||
import { Stream, StreamSource } from '@rimbu/stream'; | ||
import { Stream } from '@rimbu/stream'; | ||
import { isEmptyStreamSourceInstance } from '@rimbu/stream/custom'; | ||
export class SortedSetEmpty extends SortedEmpty { | ||
@@ -100,3 +101,3 @@ constructor(context) { | ||
addAll(values) { | ||
if (StreamSource.isEmptyInstance(values)) | ||
if (isEmptyStreamSourceInstance(values)) | ||
return this; | ||
@@ -113,3 +114,3 @@ const builder = this.toBuilder(); | ||
removeAll(values) { | ||
if (StreamSource.isEmptyInstance(values)) | ||
if (isEmptyStreamSourceInstance(values)) | ||
return this; | ||
@@ -164,3 +165,3 @@ const builder = this.toBuilder(); | ||
return this; | ||
if (StreamSource.isEmptyInstance(other)) | ||
if (isEmptyStreamSourceInstance(other)) | ||
return this; | ||
@@ -174,3 +175,3 @@ const builder = this.toBuilder(); | ||
return this.context.empty(); | ||
if (StreamSource.isEmptyInstance(other)) | ||
if (isEmptyStreamSourceInstance(other)) | ||
return this; | ||
@@ -184,3 +185,3 @@ const builder = this.toBuilder(); | ||
return this; | ||
if (StreamSource.isEmptyInstance(other)) | ||
if (isEmptyStreamSourceInstance(other)) | ||
return this.context.empty(); | ||
@@ -222,3 +223,3 @@ const builder = this.context.builder(); | ||
return this.context.empty(); | ||
if (StreamSource.isEmptyInstance(other)) | ||
if (isEmptyStreamSourceInstance(other)) | ||
return this; | ||
@@ -225,0 +226,0 @@ const builder = this.toBuilder(); |
{ | ||
"name": "@rimbu/sorted", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"description": "Immutable SortedMap and SortedSet implementations for TypeScript", | ||
@@ -73,5 +73,5 @@ "keywords": [ | ||
"@rimbu/base": "^0.8.0", | ||
"@rimbu/collection-types": "^0.9.1", | ||
"@rimbu/collection-types": "^0.9.2", | ||
"@rimbu/common": "^0.9.0", | ||
"@rimbu/stream": "^0.10.1", | ||
"@rimbu/stream": "^0.10.2", | ||
"tslib": "^2.3.1" | ||
@@ -86,3 +86,3 @@ }, | ||
}, | ||
"gitHead": "0474974142d1aa81cc6d9e746010bcd6dba60265" | ||
"gitHead": "7271174e99229284224cef3489d3e80bddb305d0" | ||
} |
@@ -14,2 +14,3 @@ import { Token } from '@rimbu/base'; | ||
import { Stream, StreamSource } from '@rimbu/stream'; | ||
import { isEmptyStreamSourceInstance } from '@rimbu/stream/custom'; | ||
@@ -136,3 +137,3 @@ export class SortedMapBuilder<K, V> | ||
if (StreamSource.isEmptyInstance(keys)) return false; | ||
if (isEmptyStreamSourceInstance(keys)) return false; | ||
@@ -139,0 +140,0 @@ const notFound = Symbol(); |
@@ -48,2 +48,3 @@ import { Arr, Entry, RimbuError, Token } from '@rimbu/base'; | ||
import { Stream, StreamSource } from '@rimbu/stream'; | ||
import { isEmptyStreamSourceInstance } from '@rimbu/stream/custom'; | ||
@@ -301,3 +302,3 @@ export class SortedMapEmpty<K = any, V = any> | ||
addEntries(entries: StreamSource<readonly [K, V]>): SortedMap.NonEmpty<K, V> { | ||
if (StreamSource.isEmptyInstance(entries)) return this; | ||
if (isEmptyStreamSourceInstance(entries)) return this; | ||
@@ -343,3 +344,3 @@ const builder = this.toBuilder(); | ||
removeKeys<UK>(keys: StreamSource<RelatedTo<K, UK>>): SortedMap<K, V> { | ||
if (StreamSource.isEmptyInstance(keys)) return this; | ||
if (isEmptyStreamSourceInstance(keys)) return this; | ||
@@ -346,0 +347,0 @@ const builder = this.toBuilder(); |
@@ -43,2 +43,3 @@ import { Arr, RimbuError } from '@rimbu/base'; | ||
import { Stream, StreamSource } from '@rimbu/stream'; | ||
import { isEmptyStreamSourceInstance } from '@rimbu/stream/custom'; | ||
@@ -188,3 +189,3 @@ export class SortedSetEmpty<T = any> | ||
addAll(values: StreamSource<T>): SortedSet.NonEmpty<T> { | ||
if (StreamSource.isEmptyInstance(values)) return this; | ||
if (isEmptyStreamSourceInstance(values)) return this; | ||
@@ -202,3 +203,3 @@ const builder = this.toBuilder(); | ||
removeAll<U>(values: StreamSource<RelatedTo<T, U>>): SortedSet<T> { | ||
if (StreamSource.isEmptyInstance(values)) return this; | ||
if (isEmptyStreamSourceInstance(values)) return this; | ||
@@ -259,3 +260,3 @@ const builder = this.toBuilder(); | ||
if (other === this) return this; | ||
if (StreamSource.isEmptyInstance(other)) return this; | ||
if (isEmptyStreamSourceInstance(other)) return this; | ||
@@ -269,3 +270,3 @@ const builder = this.toBuilder(); | ||
if (other === this) return this.context.empty(); | ||
if (StreamSource.isEmptyInstance(other)) return this; | ||
if (isEmptyStreamSourceInstance(other)) return this; | ||
@@ -279,3 +280,3 @@ const builder = this.toBuilder(); | ||
if (other === this) return this; | ||
if (StreamSource.isEmptyInstance(other)) return this.context.empty(); | ||
if (isEmptyStreamSourceInstance(other)) return this.context.empty(); | ||
@@ -318,3 +319,3 @@ const builder = this.context.builder(); | ||
if (StreamSource.isEmptyInstance(other)) return this; | ||
if (isEmptyStreamSourceInstance(other)) return this; | ||
@@ -321,0 +322,0 @@ const builder = this.toBuilder(); |
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
585415
10136
Updated@rimbu/stream@^0.10.2