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

@rimbu/stream

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rimbu/stream - npm Package Compare versions

Comparing version 0.10.2 to 0.10.3

26

dist/main/async-custom/async-fast-iterator-base.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.emptyAsyncFastIterator = exports.isAsyncFastIterator = exports.fixedDoneAsyncIteratorResult = void 0;
exports.AsyncFastIteratorBase = exports.emptyAsyncFastIterator = exports.isAsyncFastIterator = exports.fixedDoneAsyncIteratorResult = void 0;
var tslib_1 = require("tslib");
var common_1 = require("@rimbu/common");

@@ -21,2 +22,25 @@ exports.fixedDoneAsyncIteratorResult = Promise.resolve({

};
var AsyncFastIteratorBase = /** @class */ (function () {
function AsyncFastIteratorBase() {
}
AsyncFastIteratorBase.prototype.next = function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var done, value;
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {
case 0:
done = Symbol('Done');
return [4 /*yield*/, this.fastNext(done)];
case 1:
value = _a.sent();
if (done === value)
return [2 /*return*/, exports.fixedDoneAsyncIteratorResult];
return [2 /*return*/, { value: value, done: false }];
}
});
});
};
return AsyncFastIteratorBase;
}());
exports.AsyncFastIteratorBase = AsyncFastIteratorBase;
//# sourceMappingURL=async-fast-iterator-base.js.map

2

dist/main/async-custom/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./utils"), exports);
(0, tslib_1.__exportStar)(require("./async-fast-iterator-base"), exports);

@@ -8,3 +9,2 @@ (0, tslib_1.__exportStar)(require("./async-stream-source-base"), exports);

(0, tslib_1.__exportStar)(require("./constructors"), exports);
(0, tslib_1.__exportStar)(require("./utils"), exports);
//# sourceMappingURL=index.js.map

@@ -11,2 +11,3 @@ "use strict";

var tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./async-stream-source"), exports);
(0, tslib_1.__exportStar)(require("./async-fast-iterator"), exports);

@@ -16,3 +17,2 @@ (0, tslib_1.__exportStar)(require("./async-fast-iterable"), exports);

(0, tslib_1.__exportStar)(require("./interface"), exports);
(0, tslib_1.__exportStar)(require("./async-stream-source"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isFastIterator = exports.emptyFastIterator = exports.fixedDoneIteratorResult = void 0;
exports.FastIteratorBase = exports.isFastIterator = exports.emptyFastIterator = exports.fixedDoneIteratorResult = void 0;
var common_1 = require("@rimbu/common");

@@ -21,2 +21,19 @@ exports.fixedDoneIteratorResult = {

exports.isFastIterator = isFastIterator;
/**
* A base class for `FastIterator` instances, that takes implements the default `next`
* function based on the abstract `fastNext` function.
*/
var FastIteratorBase = /** @class */ (function () {
function FastIteratorBase() {
}
FastIteratorBase.prototype.next = function () {
var done = Symbol('Done');
var value = this.fastNext(done);
if (done === value)
return exports.fixedDoneIteratorResult;
return { value: value, done: false };
};
return FastIteratorBase;
}());
exports.FastIteratorBase = FastIteratorBase;
//# sourceMappingURL=fast-iterator-custom.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FromIterable = exports.FromStream = exports.StreamBase = exports.FastIteratorBase = void 0;
exports.FromIterable = exports.FromStream = exports.StreamBase = void 0;
var tslib_1 = require("tslib");
var common_1 = require("@rimbu/common");
var custom_1 = require("@rimbu/stream/custom");
/**
* A base class for `FastIterator` instances, that takes implements the default `next`
* function based on the abstract `fastNext` function.
*/
var FastIteratorBase = /** @class */ (function () {
function FastIteratorBase() {
}
FastIteratorBase.prototype.next = function () {
var done = Symbol('Done');
var value = this.fastNext(done);
if (done === value)
return custom_1.fixedDoneIteratorResult;
return { value: value, done: false };
};
return FastIteratorBase;
}());
exports.FastIteratorBase = FastIteratorBase;
var StreamBase = /** @class */ (function () {

@@ -478,3 +461,3 @@ function StreamBase() {

return PrependIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var PrependStream = /** @class */ (function (_super) {

@@ -531,3 +514,3 @@ (0, tslib_1.__extends)(PrependStream, _super);

return AppendIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var AppendStream = /** @class */ (function (_super) {

@@ -582,3 +565,3 @@ (0, tslib_1.__extends)(AppendStream, _super);

return IndexedIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var IndexedStream = /** @class */ (function (_super) {

@@ -620,3 +603,3 @@ (0, tslib_1.__extends)(IndexedStream, _super);

return MapIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var MapStream = /** @class */ (function (_super) {

@@ -682,3 +665,3 @@ (0, tslib_1.__extends)(MapStream, _super);

return MapPureIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var MapPureStream = /** @class */ (function (_super) {

@@ -754,3 +737,3 @@ (0, tslib_1.__extends)(MapPureStream, _super);

return FlatMapIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var FlatMapStream = /** @class */ (function (_super) {

@@ -798,3 +781,3 @@ (0, tslib_1.__extends)(FlatMapStream, _super);

return ConcatIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var ConcatStream = /** @class */ (function (_super) {

@@ -909,3 +892,3 @@ (0, tslib_1.__extends)(ConcatStream, _super);

return FilterIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var FilterStream = /** @class */ (function (_super) {

@@ -961,3 +944,3 @@ (0, tslib_1.__extends)(FilterStream, _super);

return FilterPureIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var FilterPureStream = /** @class */ (function (_super) {

@@ -1006,3 +989,3 @@ (0, tslib_1.__extends)(FilterPureStream, _super);

return CollectIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var CollectStream = /** @class */ (function (_super) {

@@ -1043,3 +1026,3 @@ (0, tslib_1.__extends)(CollectStream, _super);

return IndicesWhereIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var IndicesWhereStream = /** @class */ (function (_super) {

@@ -1082,3 +1065,3 @@ (0, tslib_1.__extends)(IndicesWhereStream, _super);

return IndicesOfIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var IndicesOfStream = /** @class */ (function (_super) {

@@ -1123,3 +1106,3 @@ (0, tslib_1.__extends)(IndicesOfStream, _super);

return TakeWhileIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var TakeWhileStream = /** @class */ (function (_super) {

@@ -1162,3 +1145,3 @@ (0, tslib_1.__extends)(TakeWhileStream, _super);

return DropWhileIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var DropWhileStream = /** @class */ (function (_super) {

@@ -1192,3 +1175,3 @@ (0, tslib_1.__extends)(DropWhileStream, _super);

return TakeIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var TakeStream = /** @class */ (function (_super) {

@@ -1234,3 +1217,3 @@ (0, tslib_1.__extends)(TakeStream, _super);

return DropIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var DropStream = /** @class */ (function (_super) {

@@ -1286,3 +1269,3 @@ (0, tslib_1.__extends)(DropStream, _super);

return RepeatIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var IntersperseIterator = /** @class */ (function (_super) {

@@ -1328,3 +1311,3 @@ (0, tslib_1.__extends)(IntersperseIterator, _super);

return IntersperseIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var IntersperseStream = /** @class */ (function (_super) {

@@ -1369,3 +1352,3 @@ (0, tslib_1.__extends)(IntersperseStream, _super);

return SplitWhereIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var SplitWhereStream = /** @class */ (function (_super) {

@@ -1412,3 +1395,3 @@ (0, tslib_1.__extends)(SplitWhereStream, _super);

return SplitOnIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var SplitOnStream = /** @class */ (function (_super) {

@@ -1454,3 +1437,3 @@ (0, tslib_1.__extends)(SplitOnStream, _super);

return ReduceIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var ReduceStream = /** @class */ (function (_super) {

@@ -1512,3 +1495,3 @@ (0, tslib_1.__extends)(ReduceStream, _super);

return ReduceAllIterator;
}(FastIteratorBase));
}(custom_1.FastIteratorBase));
var ReduceAllStream = /** @class */ (function (_super) {

@@ -1515,0 +1498,0 @@ (0, tslib_1.__extends)(ReduceAllStream, _super);

@@ -16,6 +16,6 @@ "use strict";

(0, tslib_1.__exportStar)(require("./fast-iterable"), exports);
(0, tslib_1.__exportStar)(require("./interface"), exports);
(0, tslib_1.__exportStar)(require("./streamable"), exports);
(0, tslib_1.__exportStar)(require("./stream-source"), exports);
(0, tslib_1.__exportStar)(require("./interface"), exports);
(0, tslib_1.__exportStar)(require("@rimbu/stream/async"), exports);
//# sourceMappingURL=index.js.map

@@ -0,1 +1,2 @@

import { __awaiter } from "tslib";
import { AsyncOptLazy } from '@rimbu/common';

@@ -17,2 +18,13 @@ export const fixedDoneAsyncIteratorResult = Promise.resolve({

};
export class AsyncFastIteratorBase {
next() {
return __awaiter(this, void 0, void 0, function* () {
const done = Symbol('Done');
const value = yield this.fastNext(done);
if (done === value)
return fixedDoneAsyncIteratorResult;
return { value, done: false };
});
}
}
//# sourceMappingURL=async-fast-iterator-base.js.map
import { __awaiter } from "tslib";
import { AsyncOptLazy, CollectFun, Comp, Eq, TraverseState, } from '@rimbu/common';
import { closeIters, isEmptyAsyncStreamSourceInstance, fixedDoneAsyncIteratorResult, AsyncStreamConstructorsImpl, } from '@rimbu/stream/async-custom';
export class AsyncFastIteratorBase {
next() {
return __awaiter(this, void 0, void 0, function* () {
const done = Symbol('Done');
const value = yield this.fastNext(done);
if (done === value)
return fixedDoneAsyncIteratorResult;
return { value, done: false };
});
}
}
import { closeIters, isEmptyAsyncStreamSourceInstance, AsyncStreamConstructorsImpl, AsyncFastIteratorBase, } from '@rimbu/stream/async-custom';
export class AsyncStreamBase {

@@ -16,0 +5,0 @@ asyncStream() {

@@ -0,1 +1,2 @@

export * from './utils';
export * from './async-fast-iterator-base';

@@ -5,3 +6,2 @@ export * from './async-stream-source-base';

export * from './constructors';
export * from './utils';
//# sourceMappingURL=index.js.map

@@ -8,2 +8,3 @@ /**

*/
export * from './async-stream-source';
export * from './async-fast-iterator';

@@ -13,3 +14,2 @@ export * from './async-fast-iterable';

export * from './interface';
export * from './async-stream-source';
//# sourceMappingURL=index.js.map

@@ -17,2 +17,15 @@ import { OptLazy } from '@rimbu/common';

}
/**
* A base class for `FastIterator` instances, that takes implements the default `next`
* function based on the abstract `fastNext` function.
*/
export class FastIteratorBase {
next() {
const done = Symbol('Done');
const value = this.fastNext(done);
if (done === value)
return fixedDoneIteratorResult;
return { value, done: false };
}
}
//# sourceMappingURL=fast-iterator-custom.js.map
import { CollectFun, Comp, Eq, OptLazy, Reducer, TraverseState, } from '@rimbu/common';
import { fixedDoneIteratorResult, isEmptyStreamSourceInstance, isFastIterator, StreamConstructorsImpl, } from '@rimbu/stream/custom';
/**
* A base class for `FastIterator` instances, that takes implements the default `next`
* function based on the abstract `fastNext` function.
*/
export class FastIteratorBase {
next() {
const done = Symbol('Done');
const value = this.fastNext(done);
if (done === value)
return fixedDoneIteratorResult;
return { value, done: false };
}
}
import { isEmptyStreamSourceInstance, isFastIterator, StreamConstructorsImpl, FastIteratorBase, } from '@rimbu/stream/custom';
export class StreamBase {

@@ -17,0 +4,0 @@ stream() {

@@ -13,6 +13,6 @@ /**

export * from './fast-iterable';
export * from './interface';
export * from './streamable';
export * from './stream-source';
export * from './interface';
export * from '@rimbu/stream/async';
//# sourceMappingURL=index.js.map

@@ -0,1 +1,2 @@

import { AsyncOptLazy, MaybePromise } from '@rimbu/common';
import type { AsyncFastIterator } from '@rimbu/stream/async';

@@ -5,1 +6,6 @@ export declare const fixedDoneAsyncIteratorResult: Promise<IteratorReturnResult<any> | IteratorYieldResult<any>>;

export declare const emptyAsyncFastIterator: AsyncFastIterator<any>;
export declare abstract class AsyncFastIteratorBase<T> implements AsyncFastIterator<T> {
abstract fastNext<O>(otherwise?: AsyncOptLazy<O>): MaybePromise<T | O>;
return?: () => Promise<any>;
next(): Promise<IteratorResult<T>>;
}
import { ArrayNonEmpty, AsyncCollectFun, AsyncOptLazy, AsyncReducer, Eq, MaybePromise, ToJSON, TraverseState } from '@rimbu/common';
import type { AsyncFastIterator, AsyncStream, AsyncStreamSource } from '@rimbu/stream/async';
export declare abstract class AsyncFastIteratorBase<T> implements AsyncFastIterator<T> {
abstract fastNext<O>(otherwise?: AsyncOptLazy<O>): MaybePromise<T | O>;
return?: () => Promise<any>;
next(): Promise<IteratorResult<T>>;
}
export declare abstract class AsyncStreamBase<T> implements AsyncStream<T> {

@@ -9,0 +4,0 @@ abstract [Symbol.asyncIterator](): AsyncFastIterator<T>;

@@ -0,1 +1,2 @@

export * from './utils';
export * from './async-fast-iterator-base';

@@ -5,2 +6,1 @@ export * from './async-stream-source-base';

export * from './constructors';
export * from './utils';

@@ -8,2 +8,3 @@ /**

*/
export * from './async-stream-source';
export * from './async-fast-iterator';

@@ -13,2 +14,1 @@ export * from './async-fast-iterable';

export * from './interface';
export * from './async-stream-source';

@@ -0,1 +1,2 @@

import { OptLazy } from '@rimbu/common';
import type { FastIterator } from '@rimbu/stream';

@@ -5,1 +6,9 @@ export declare const fixedDoneIteratorResult: IteratorResult<any>;

export declare function isFastIterator<T>(iterator: Iterator<T>): iterator is FastIterator<T>;
/**
* A base class for `FastIterator` instances, that takes implements the default `next`
* function based on the abstract `fastNext` function.
*/
export declare abstract class FastIteratorBase<T> implements FastIterator<T> {
abstract fastNext<O>(otherwise?: OptLazy<O>): T | O;
next(): IteratorResult<T>;
}
import { ArrayNonEmpty, CollectFun, Eq, OptLazy, Reducer, ToJSON, TraverseState } from '@rimbu/common';
import type { FastIterator, Stream, StreamSource } from '@rimbu/stream';
/**
* A base class for `FastIterator` instances, that takes implements the default `next`
* function based on the abstract `fastNext` function.
*/
export declare abstract class FastIteratorBase<T> implements FastIterator<T> {
abstract fastNext<O>(otherwise?: OptLazy<O>): T | O;
next(): IteratorResult<T>;
}
export declare abstract class StreamBase<T> implements Stream<T> {

@@ -12,0 +4,0 @@ abstract [Symbol.iterator](): FastIterator<T>;

@@ -13,5 +13,5 @@ /**

export * from './fast-iterable';
export * from './interface';
export * from './streamable';
export * from './stream-source';
export * from './interface';
export * from '@rimbu/stream/async';
{
"name": "@rimbu/stream",
"version": "0.10.2",
"version": "0.10.3",
"description": "Efficient structure representing a sequence of elements, with powerful operations for TypeScript",

@@ -80,3 +80,3 @@ "keywords": [

},
"gitHead": "7271174e99229284224cef3489d3e80bddb305d0"
"gitHead": "1e954ea5904e67edb3dea7ea3d4097c783f505f1"
}

@@ -23,1 +23,13 @@ import { AsyncOptLazy, MaybePromise } from '@rimbu/common';

};
export abstract class AsyncFastIteratorBase<T> implements AsyncFastIterator<T> {
abstract fastNext<O>(otherwise?: AsyncOptLazy<O>): MaybePromise<T | O>;
return?: () => Promise<any>;
async next(): Promise<IteratorResult<T>> {
const done = Symbol('Done');
const value = await this.fastNext(done);
if (done === value) return fixedDoneAsyncIteratorResult;
return { value, done: false };
}
}

@@ -21,18 +21,6 @@ import {

isEmptyAsyncStreamSourceInstance,
fixedDoneAsyncIteratorResult,
AsyncStreamConstructorsImpl,
AsyncFastIteratorBase,
} from '@rimbu/stream/async-custom';
export abstract class AsyncFastIteratorBase<T> implements AsyncFastIterator<T> {
abstract fastNext<O>(otherwise?: AsyncOptLazy<O>): MaybePromise<T | O>;
return?: () => Promise<any>;
async next(): Promise<IteratorResult<T>> {
const done = Symbol('Done');
const value = await this.fastNext(done);
if (done === value) return fixedDoneAsyncIteratorResult;
return { value, done: false };
}
}
export abstract class AsyncStreamBase<T> implements AsyncStream<T> {

@@ -39,0 +27,0 @@ abstract [Symbol.asyncIterator](): AsyncFastIterator<T>;

@@ -0,5 +1,6 @@

export * from './utils';
export * from './async-fast-iterator-base';
export * from './async-stream-source-base';
export * from './async-stream-custom';
export * from './constructors';
export * from './utils';

@@ -9,2 +9,3 @@ /**

export * from './async-stream-source';
export * from './async-fast-iterator';

@@ -15,2 +16,1 @@ export * from './async-fast-iterable';

export * from './interface';
export * from './async-stream-source';

@@ -23,1 +23,16 @@ import { OptLazy } from '@rimbu/common';

}
/**
* A base class for `FastIterator` instances, that takes implements the default `next`
* function based on the abstract `fastNext` function.
*/
export abstract class FastIteratorBase<T> implements FastIterator<T> {
abstract fastNext<O>(otherwise?: OptLazy<O>): T | O;
next(): IteratorResult<T> {
const done = Symbol('Done');
const value = this.fastNext(done);
if (done === value) return fixedDoneIteratorResult;
return { value, done: false };
}
}
export * from './fast-iterator-custom';
export * from './stream-source-base';
export * from './stream-custom';
export * from './constructors';

@@ -13,23 +13,8 @@ import {

import {
fixedDoneIteratorResult,
isEmptyStreamSourceInstance,
isFastIterator,
StreamConstructorsImpl,
FastIteratorBase,
} from '@rimbu/stream/custom';
/**
* A base class for `FastIterator` instances, that takes implements the default `next`
* function based on the abstract `fastNext` function.
*/
export abstract class FastIteratorBase<T> implements FastIterator<T> {
abstract fastNext<O>(otherwise?: OptLazy<O>): T | O;
next(): IteratorResult<T> {
const done = Symbol('Done');
const value = this.fastNext(done);
if (done === value) return fixedDoneIteratorResult;
return { value, done: false };
}
}
export abstract class StreamBase<T> implements Stream<T> {

@@ -36,0 +21,0 @@ abstract [Symbol.iterator](): FastIterator<T>;

@@ -14,5 +14,7 @@ /**

export * from './fast-iterable';
export * from './interface';
export * from './streamable';
export * from './stream-source';
export * from './interface';
export * from '@rimbu/stream/async';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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

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