@cloudbase/app
Version:
cloudbase javascript sdk core
18 lines (17 loc) • 1.18 kB
TypeScript
/// <reference types="node" />
import { ReadableStream } from 'web-streams-polyfill';
export declare const isFormData: (obj: unknown) => boolean, toQueryString: (data: Record<string, any>) => string;
export declare function getEnv(): Record<string, string | undefined>;
export declare function getEnv(key: string): string | undefined;
export declare const checkIsInScf: () => boolean;
export declare function checkIsInCBR(): boolean;
export declare function checkIsInSumeru(): boolean;
export declare function isNonEmptyString(str: string): boolean;
export declare function checkIsInTencentCloud(): Promise<boolean>;
export declare const getCurrRunEnvTag: () => Promise<string>;
export declare const validateUid: (uid: string) => void;
export declare function safeParseJson(text: string): any;
export declare function obj2StrRecord(obj: object): Record<string, string>;
export declare function headersInit2Indexable(h: HeadersInit): Record<string, string> | [string, string][];
export declare function parseQueryString(search: string): Record<string, string | string[]>;
export declare function createWebStreamFromNodeReadableStream(stream: NodeJS.ReadableStream): ReadableStream;