Page MenuHomeSealhub

pipe-into.ts
No OneTemporary

pipe-into.ts

import { Writable, Readable } from "stream";
export default function pipeInto(
fromStream: Readable,
push: (data: any) => void
) {
let outStream = fromStream.pipe(
new Writable({
write(data, _, next) {
push(data);
next(null);
},
})
);
return new Promise<void>((resolve) => {
outStream.on("finish", () => resolve());
});
}

File Metadata

Mime Type
text/x-java
Expires
Fri, Nov 22, 07:23 (8 m, 41 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
547619
Default Alt Text
pipe-into.ts (350 B)

Event Timeline