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

@rimbu/list

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

@rimbu/list - npm Package Compare versions

Comparing version 0.10.12 to 0.10.13

6

dist/main/custom/context.js

@@ -89,3 +89,5 @@ "use strict";

};
this.flatten = function (source) { return _this.from(source).flatMap(function (s) { return s; }); };
this.flatten = function (source) {
return _this.from(source).flatMap(function (s) { return s; });
};
this.unzip = function (source, length) {

@@ -200,5 +202,5 @@ var streams = stream_1.Stream.unzip(source, length);

var _a;
return new ListContext((_a = options === null || options === void 0 ? void 0 : options.blockSizeBits) !== null && _a !== void 0 ? _a : 5);
return Object.freeze(new ListContext((_a = options === null || options === void 0 ? void 0 : options.blockSizeBits) !== null && _a !== void 0 ? _a : 5));
}
exports.createListContext = createListContext;
//# sourceMappingURL=context.js.map

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

function createEmptyList(context) {
return new Empty(context);
return Object.freeze(new Empty(context));
}
exports.createEmptyList = createEmptyList;
//# sourceMappingURL=empty.js.map

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

var _defaultContext = (0, custom_1.createListContext)();
exports.List = tslib_1.__assign({ createContext: custom_1.createListContext, defaultContext: function () {
exports.List = Object.freeze(tslib_1.__assign({ createContext: custom_1.createListContext, defaultContext: function () {
return _defaultContext;
} }, _defaultContext);
} }, _defaultContext));
//# sourceMappingURL=interface.js.map

@@ -170,4 +170,4 @@ import { RimbuError } from '@rimbu/base';

var _a;
return new ListContext((_a = options === null || options === void 0 ? void 0 : options.blockSizeBits) !== null && _a !== void 0 ? _a : 5);
return Object.freeze(new ListContext((_a = options === null || options === void 0 ? void 0 : options.blockSizeBits) !== null && _a !== void 0 ? _a : 5));
}
//# sourceMappingURL=context.js.map

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

export function createEmptyList(context) {
return new Empty(context);
return Object.freeze(new Empty(context));
}
//# sourceMappingURL=empty.js.map
import { createListContext } from '@rimbu/list/custom';
const _defaultContext = createListContext();
export const List = Object.assign({ createContext: createListContext, defaultContext() {
export const List = Object.freeze(Object.assign({ createContext: createListContext, defaultContext() {
return _defaultContext;
} }, _defaultContext);
} }, _defaultContext));
//# sourceMappingURL=interface.js.map

@@ -13,12 +13,12 @@ import { Reducer } from '@rimbu/common';

get _types(): List.Types;
builder: <T>() => GenBuilder<T>;
readonly builder: <T>() => GenBuilder<T>;
createBuilder<T>(source?: List<T>): GenBuilder<T>;
readonly _empty: List<any>;
empty: <T>() => List<T>;
of: <T>(values_0: T, ...values_1: T[]) => List.NonEmpty<T>;
from: <T>(sources_0: StreamSource<T>, ...sources_1: StreamSource<T>[]) => any;
fromString: (sources_0: string, ...sources_1: string[]) => any;
reducer: <T>(source?: StreamSource<T>) => Reducer<T, List<T>>;
flatten: (source: any) => any;
unzip: (source: any, length: number) => any;
readonly empty: <T>() => List<T>;
readonly of: <T>(values_0: T, ...values_1: T[]) => List.NonEmpty<T>;
readonly from: <T>(sources_0: StreamSource<T>, ...sources_1: StreamSource<T>[]) => any;
readonly fromString: (sources_0: string, ...sources_1: string[]) => any;
readonly reducer: <T>(source?: StreamSource<T>) => Reducer<T, List<T>>;
readonly flatten: (source: any) => any;
readonly unzip: (source: any, length: number) => any;
leafBlock<T>(children: readonly T[]): LeafBlock<T>;

@@ -25,0 +25,0 @@ reversedLeaf<T>(children: readonly T[]): ReversedLeafBlock<T>;

{
"name": "@rimbu/list",
"version": "0.10.12",
"version": "0.10.13",
"description": "An efficient immutable ordered sequence of elements akin to a Vector",

@@ -67,6 +67,6 @@ "keywords": [

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

@@ -88,3 +88,3 @@ },

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

@@ -53,3 +53,3 @@ import { RimbuError } from '@rimbu/base';

builder = <T>(): GenBuilder<T> => {
readonly builder = <T>(): GenBuilder<T> => {
return new GenBuilder<T>(this);

@@ -78,7 +78,7 @@ };

empty = <T>(): List<T> => {
readonly empty = <T>(): List<T> => {
return this._empty;
};
of = <T>(...values: ArrayNonEmpty<T>): List.NonEmpty<T> => {
readonly of = <T>(...values: ArrayNonEmpty<T>): List.NonEmpty<T> => {
if (values.length <= this.maxBlockSize) return this.leafBlock(values);

@@ -88,3 +88,3 @@ return this.from(values);

from = <T>(...sources: ArrayNonEmpty<StreamSource<T>>): any => {
readonly from = <T>(...sources: ArrayNonEmpty<StreamSource<T>>): any => {
if (sources.length === 1) {

@@ -126,7 +126,7 @@ const source = sources[0];

fromString = (...sources: ArrayNonEmpty<string>): any => {
readonly fromString = (...sources: ArrayNonEmpty<string>): any => {
return this.from(...sources);
};
reducer = <T>(source?: StreamSource<T>): Reducer<T, List<T>> => {
readonly reducer = <T>(source?: StreamSource<T>): Reducer<T, List<T>> => {
return Reducer.create(

@@ -145,5 +145,6 @@ () =>

flatten = (source: any): any => this.from(source).flatMap((s: any) => s);
readonly flatten = (source: any): any =>
this.from(source).flatMap((s: any) => s);
unzip = (source: any, length: number): any => {
readonly unzip = (source: any, length: number): any => {
const streams = Stream.unzip(source, length) as any as Stream<any>[];

@@ -290,3 +291,3 @@

}): List.Context {
return new ListContext(options?.blockSizeBits ?? 5);
return Object.freeze(new ListContext(options?.blockSizeBits ?? 5));
}

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

export function createEmptyList(context: ListContext): List<any> {
return new Empty(context);
return Object.freeze(new Empty(context));
}

@@ -1075,3 +1075,3 @@ import type {

export const List: ListCreators = {
export const List: ListCreators = Object.freeze({
createContext: createListContext,

@@ -1082,2 +1082,2 @@ defaultContext() {

..._defaultContext,
};
});

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