Page MenuHomeSealhub

stringify.ts
No OneTemporary

stringify.ts

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

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)

Event Timeline