Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F969747
stringify.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
500 B
Referenced Files
None
Subscribers
None
stringify.ts
View Options
import
{
Readable
}
from
"stream"
;
type
basic
=
string
|
number
|
Readable
|
null
;
export
type
Stringifiable
=
|
basic
|
basic
[]
|
Promise
<
basic
>
|
Promise
<
basic
[]
>
|
Promise
<
basic
>
[];
export
async
function
stringify
(
value
:
Stringifiable
)
:
Promise
<
string
|
Readable
>
{
value
=
await
value
;
if
(
typeof
value
===
"string"
||
value
instanceof
Readable
)
{
return
value
;
}
if
(
typeof
value
===
"number"
)
{
return
value
.
toString
();
}
if
(
value
===
null
)
{
return
""
;
}
return
""
;
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sat, Nov 23, 17:01 (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
547998
Default Alt Text
stringify.ts (500 B)
Attached To
Mode
rSTREAM tempstream
Attached
Detach File
Event Timeline
Log In to Comment