🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

rx-from-async-iterator

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rx-from-async-iterator - npm Package Compare versions

Comparing version
1.3.1
to
1.3.2
+1
-1
es/index.d.ts

@@ -10,3 +10,3 @@ /// <reference lib="es2018.asynciterable" />

export declare type StopCallback = () => void;
export declare function asStream<T = unknown>(g: AsyncGenerator<T, void, void>, cancellation: CancellationToken): (ob: {
export declare function asStream<T = unknown>(g: AsyncGenerator<T, void, void>, cancellation?: CancellationToken): (ob: {
next(result: T): void;

@@ -13,0 +13,0 @@ complete(): void;

@@ -30,3 +30,8 @@ /// <reference lib="es2018.asynciterable" />

}
export function asStream(g, cancellation) {
export function asStream(g, cancellation = {
cancel() { },
canceled() {
return false;
}
}) {
return (ob) => {

@@ -33,0 +38,0 @@ const run = () => {

@@ -10,3 +10,3 @@ /// <reference lib="es2018.asynciterable" />

export declare type StopCallback = () => void;
export declare function asStream<T = unknown>(g: AsyncGenerator<T, void, void>, cancellation: CancellationToken): (ob: {
export declare function asStream<T = unknown>(g: AsyncGenerator<T, void, void>, cancellation?: CancellationToken): (ob: {
next(result: T): void;

@@ -13,0 +13,0 @@ complete(): void;

@@ -35,2 +35,8 @@ "use strict";

function asStream(g, cancellation) {
if (cancellation === void 0) { cancellation = {
cancel: function () { },
canceled: function () {
return false;
}
}; }
return function (ob) {

@@ -37,0 +43,0 @@ var run = function () {

{
"name": "rx-from-async-iterator",
"version": "1.3.1",
"version": "1.3.2",
"description": "Convert asyncGenerator object to Rx.Observable",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -46,3 +46,8 @@ /// <reference lib="es2018.asynciterable" />

g: AsyncGenerator<T, void, void>,
cancellation: CancellationToken
cancellation: CancellationToken = {
cancel() {},
canceled() {
return false;
}
}
) {

@@ -49,0 +54,0 @@ return (ob: {