Socket
Socket
Sign inDemoInstall

@effection/stream

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@effection/stream - npm Package Compare versions

Comparing version 2.0.0-beta.5 to 2.0.0-v2-writable-unification.1633595877341

1

dist-cjs/index.d.ts
export { createStream, Stream } from './stream';
export { Writable, WritableStream } from './writable-stream';
//# sourceMappingURL=index.d.ts.map

2

dist-cjs/stream.d.ts
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

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