@effection/stream
Advanced tools
Comparing version 2.0.0-beta.5 to 2.0.0-v2-writable-unification.1633595877341
export { createStream, Stream } from './stream'; | ||
export { Writable, WritableStream } from './writable-stream'; | ||
//# sourceMappingURL=index.d.ts.map |
import { Subscription } from '@effection/subscription'; | ||
import { Operation, Task, Resource } from '@effection/core'; | ||
import { DeepPartial } from './match'; | ||
export declare type Callback<T, TReturn> = (publish: (value: T) => void) => Operation<TReturn>; | ||
export declare type Callback<T, TReturn> = (publish: (value: T) => Operation<void>) => Operation<TReturn>; | ||
export interface Stream<T, TReturn = undefined> extends Resource<Subscription<T, TReturn>> { | ||
@@ -6,0 +6,0 @@ filter<R extends T>(predicate: (value: T) => value is R): Stream<R, TReturn>; |
@@ -13,3 +13,3 @@ "use strict"; | ||
let result = yield callback(queue.send); | ||
queue.closeWith(result); | ||
yield queue.close(result); | ||
}, { labels: { name: 'publisher', expand: false } }); | ||
@@ -22,3 +22,3 @@ return queue.subscription; | ||
if (predicate(value)) { | ||
publish(value); | ||
yield publish(value); | ||
} | ||
@@ -48,3 +48,3 @@ }); | ||
return stream.forEach((value) => function* () { | ||
publish(mapper(value)); | ||
yield publish(mapper(value)); | ||
}); | ||
@@ -87,3 +87,3 @@ }, `${name}.map()`); | ||
for (let value of buffer) { | ||
publish(value); | ||
yield publish(value); | ||
} | ||
@@ -90,0 +90,0 @@ return yield stream.forEach(publish); |
export { createStream, Stream } from './stream'; | ||
export { Writable, WritableStream } from './writable-stream'; | ||
//# sourceMappingURL=index.d.ts.map |
import { Subscription } from '@effection/subscription'; | ||
import { Operation, Task, Resource } from '@effection/core'; | ||
import { DeepPartial } from './match'; | ||
export declare type Callback<T, TReturn> = (publish: (value: T) => void) => Operation<TReturn>; | ||
export declare type Callback<T, TReturn> = (publish: (value: T) => Operation<void>) => Operation<TReturn>; | ||
export interface Stream<T, TReturn = undefined> extends Resource<Subscription<T, TReturn>> { | ||
@@ -6,0 +6,0 @@ filter<R extends T>(predicate: (value: T) => value is R): Stream<R, TReturn>; |
@@ -10,3 +10,3 @@ import { createQueue } from '@effection/subscription'; | ||
let result = yield callback(queue.send); | ||
queue.closeWith(result); | ||
yield queue.close(result); | ||
}, { labels: { name: 'publisher', expand: false } }); | ||
@@ -19,3 +19,3 @@ return queue.subscription; | ||
if (predicate(value)) { | ||
publish(value); | ||
yield publish(value); | ||
} | ||
@@ -45,3 +45,3 @@ }); | ||
return stream.forEach((value) => function* () { | ||
publish(mapper(value)); | ||
yield publish(mapper(value)); | ||
}); | ||
@@ -84,3 +84,3 @@ }, `${name}.map()`); | ||
for (let value of buffer) { | ||
publish(value); | ||
yield publish(value); | ||
} | ||
@@ -87,0 +87,0 @@ return yield stream.forEach(publish); |
{ | ||
"name": "@effection/stream", | ||
"version": "2.0.0-beta.5", | ||
"version": "2.0.0-v2-writable-unification.1633595877341", | ||
"description": "Effection Stream", | ||
@@ -31,4 +31,4 @@ "main": "dist-cjs/index.js", | ||
"dependencies": { | ||
"@effection/core": "2.0.0-beta.16", | ||
"@effection/subscription": "2.0.0-beta.18" | ||
"@effection/core": "2.0.0-v2-writable-unification.1633595877341", | ||
"@effection/subscription": "2.0.0-v2-writable-unification.1633595877341" | ||
}, | ||
@@ -35,0 +35,0 @@ "devDependencies": { |
export { createStream, Stream } from './stream'; | ||
export { Writable, WritableStream } from './writable-stream'; |
@@ -6,3 +6,3 @@ import { createQueue, Subscription } from '@effection/subscription'; | ||
export type Callback<T,TReturn> = (publish: (value: T) => void) => Operation<TReturn>; | ||
export type Callback<T,TReturn> = (publish: (value: T) => Operation<void>) => Operation<TReturn>; | ||
@@ -33,3 +33,3 @@ export interface Stream<T, TReturn = undefined> extends Resource<Subscription<T, TReturn>> { | ||
let result = yield callback(queue.send); | ||
queue.closeWith(result); | ||
yield queue.close(result); | ||
}, { labels: { name: 'publisher', expand: false } }); | ||
@@ -45,3 +45,3 @@ return queue.subscription; | ||
if(predicate(value)) { | ||
publish(value); | ||
yield publish(value); | ||
} | ||
@@ -76,3 +76,3 @@ }); | ||
return stream.forEach((value: T) => function*() { | ||
publish(mapper(value)); | ||
yield publish(mapper(value)); | ||
}); | ||
@@ -126,3 +126,3 @@ }, `${name}.map()`); | ||
for(let value of buffer) { | ||
publish(value); | ||
yield publish(value); | ||
} | ||
@@ -129,0 +129,0 @@ return yield stream.forEach(publish); |
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
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
36290
39
497
+ Added@effection/core@2.0.0-v2-writable-unification.1633595877341(transitive)
+ Added@effection/subscription@2.0.0-v2-writable-unification.1633595877341(transitive)
- Removed@effection/core@2.0.0-beta.16(transitive)
- Removed@effection/subscription@2.0.0-beta.18(transitive)
Updated@effection/core@2.0.0-v2-writable-unification.1633595877341
Updated@effection/subscription@2.0.0-v2-writable-unification.1633595877341