yield-stream
Advanced tools
Comparing version 0.0.1 to 1.0.0
@@ -23,1 +23,2 @@ import { GeneratorFn, StreamGenerator } from "./types"; | ||
export declare const streamArray: <T>(array: T[]) => ReadableStream<T>; | ||
export * from "./types"; |
@@ -1,1 +0,1 @@ | ||
const c=(...e)=>e.reduce((r,t)=>async function*(n){for await(const o of r(n))yield*t(o)}),f=(e,...r)=>{const t=c(...r);return a(async function*(){for await(const n of s(e))yield*t(n)})},s=async function*(e,r){const t=e.getReader();for(;!r?.signal.aborted;){const{done:n,value:o}=await t.read();if(n)break;yield o}},a=(e,r)=>new ReadableStream({async start(t){for await(const n of e(r))t.enqueue(n);t.close()}}),T=e=>a(function*(){for(const r of e)yield r});export{c as compose,a as generateStream,f as pipeline,T as streamArray,s as yieldStream}; | ||
const c=(...e)=>e.reduce((r,t)=>async function*(n){for await(const o of r(n))yield*t(o)}),d=(e,...r)=>{const t=c(...r);return a(async function*(){for await(const n of s(e))yield*t(n)})},s=async function*(e,r){const t=e.getReader();for(;!r?.signal.aborted;){const{done:n,value:o}=await t.read();if(n)break;yield o}},a=(e,r)=>new ReadableStream({async start(t){for await(const n of e(r))t.enqueue(n);t.close()}}),m=e=>a(function*(){for(const r of e)yield r});export*from"./types.js";export{c as compose,a as generateStream,d as pipeline,m as streamArray,s as yieldStream}; |
{ | ||
"name": "yield-stream", | ||
"version": "0.0.1", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "type": "module", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
5892
41
1