@rimbu/stream
Advanced tools
Comparing version 0.5.10 to 0.5.11
"use strict"; | ||
var _a; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -340,4 +341,4 @@ exports.FromIterable = exports.FromStream = exports.StreamBase = exports.FastIteratorBase = void 0; | ||
}; | ||
StreamBase.prototype.join = function (_a) { | ||
var _b = _a === void 0 ? {} : _a, _c = _b.sep, sep = _c === void 0 ? '' : _c, _d = _b.start, start = _d === void 0 ? '' : _d, _e = _b.end, end = _e === void 0 ? '' : _e, _f = _b.valueToString, valueToString = _f === void 0 ? String : _f; | ||
StreamBase.prototype.join = function (_b) { | ||
var _c = _b === void 0 ? {} : _b, _d = _c.sep, sep = _d === void 0 ? '' : _d, _e = _c.start, start = _e === void 0 ? '' : _e, _f = _c.end, end = _f === void 0 ? '' : _f, _g = _c.valueToString, valueToString = _g === void 0 ? String : _g; | ||
var done = Symbol('Done'); | ||
@@ -354,4 +355,4 @@ var iterator = this[Symbol.iterator](); | ||
}; | ||
StreamBase.prototype.mkGroup = function (_a) { | ||
var _b = _a === void 0 ? {} : _a, _c = _b.sep, sep = _c === void 0 ? internal_1.Stream.empty() : _c, _d = _b.start, start = _d === void 0 ? internal_1.Stream.empty() : _d, _e = _b.end, end = _e === void 0 ? internal_1.Stream.empty() : _e; | ||
StreamBase.prototype.mkGroup = function (_b) { | ||
var _c = _b === void 0 ? {} : _b, _d = _c.sep, sep = _d === void 0 ? internal_1.Stream.empty() : _d, _e = _c.start, start = _e === void 0 ? internal_1.Stream.empty() : _e, _f = _c.end, end = _f === void 0 ? internal_1.Stream.empty() : _f; | ||
return internal_1.Stream.from(start, this.intersperse(sep), end); | ||
@@ -511,3 +512,3 @@ }; | ||
_this.createIterator = createIterator; | ||
_this[Symbol.iterator] = _this.createIterator; | ||
_this[_a] = _this.createIterator; | ||
return _this; | ||
@@ -518,2 +519,3 @@ } | ||
exports.FromStream = FromStream; | ||
_a = Symbol.iterator; | ||
var PrependIterator = /** @class */ (function (_super) { | ||
@@ -520,0 +522,0 @@ tslib_1.__extends(PrependIterator, _super); |
@@ -0,1 +1,2 @@ | ||
var _a; | ||
import { CollectFun, Comp, Eq, OptLazy, Reducer, TraverseState, } from '@rimbu/common'; | ||
@@ -422,5 +423,6 @@ import { FastIterator, Stream, StreamSource } from './internal'; | ||
this.createIterator = createIterator; | ||
this[Symbol.iterator] = this.createIterator; | ||
this[_a] = this.createIterator; | ||
} | ||
} | ||
_a = Symbol.iterator; | ||
class PrependIterator extends FastIteratorBase { | ||
@@ -427,0 +429,0 @@ constructor(source, item) { |
{ | ||
"name": "@rimbu/stream", | ||
"version": "0.5.10", | ||
"version": "0.5.11", | ||
"description": "Efficient structure representing a sequence of elements, with powerful operations for TypeScript", | ||
@@ -40,3 +40,4 @@ "keywords": [ | ||
"files": [ | ||
"dist" | ||
"dist", | ||
"src" | ||
], | ||
@@ -59,11 +60,5 @@ "scripts": { | ||
"sideEffects": false, | ||
"devDependencies": { | ||
"@types/jest": "^26.0.23", | ||
"jest": "^26.6.3", | ||
"ts-jest": "^26.5.5", | ||
"typescript": "^4.2.4" | ||
}, | ||
"dependencies": { | ||
"@rimbu/base": "^0.5.8", | ||
"@rimbu/common": "^0.5.8" | ||
"@rimbu/base": "^0.5.9", | ||
"@rimbu/common": "^0.5.9" | ||
}, | ||
@@ -73,3 +68,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "ac4608d3221339352917943ef3513192ddef5a4f" | ||
"gitHead": "0158eaad0dec4503e92cb308af952869d68faad5" | ||
} |
@@ -7,9 +7,16 @@ <p align="center"> | ||
This package exports the following types: | ||
A Stream is an Iterable-like structure that represents a source that can stream values when requested. The source is unspecified, it may be a materialized object (e.g. an Array), or a calculated sequence (e.g. the fibonacci numbers). However, unlike an Iterable, a Stream offers many methods to change the values produced by the Stream, before it is consumed, without the need to `materialize` intermediate instances. | ||
| Name | Description | | ||
| ---- | ----------- | | ||
This package exports the following main types: | ||
For complete documentation please visit the _[Rimbu Docs](http://rimbu.org/rimbu-core)_. | ||
| Name | Description | | ||
| ----------------- | ---------------------------------------------------------------------------------------------------- | | ||
| `FastIterator<T>` | an Iterable that supports faster iterating than the `Iterable` type | | ||
| `FastIterator<T>` | an Iterator that supports faster iterating than the `Iterator` type | | ||
| `Stream<T>` | an Iterable-like structure that represents a source that can produce values of type T when requested | | ||
| `Streamable<T>` | an interface requiring that an object has a `.stream()` method | | ||
| `StreamSource<T>` | a convenience type that covers all types that can be automatically converted to a `Stream` | | ||
For complete documentation please visit the _[Rimbu Docs](http://rimbu.org)_. | ||
## Installation | ||
@@ -21,7 +28,7 @@ | ||
`yarn add @rimbu/sorted` | ||
> `yarn add @rimbu/stream` | ||
or | ||
`npm i @rimbu/sorted` | ||
> `npm i @rimbu/stream` | ||
@@ -45,2 +52,8 @@ ### recommended tsconfig settings | ||
```ts | ||
import { Stream } from '@rimbu/stream'; | ||
console.log(Stream.range({ start: 10, amount: 15 }).toArray()); | ||
``` | ||
## Author | ||
@@ -47,0 +60,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
496436
0
57
9759
75
Updated@rimbu/base@^0.5.9
Updated@rimbu/common@^0.5.9