Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F10352800
pipe-into.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
391 B
Referenced Files
None
Subscribers
None
pipe-into.ts
View Options
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
,
reject
)
=>
{
outStream
.
on
(
"finish"
,
()
=>
resolve
());
outStream
.
on
(
"error"
,
reject
);
});
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sun, Nov 2, 20:30 (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1030513
Default Alt Text
pipe-into.ts (391 B)
Attached To
Mode
rSTREAM tempstream
Attached
Detach File
Event Timeline
Log In to Comment