UNPKG

@dodona/papyros

Version:

Scratchpad for multiple programming languages in the browser.

13 lines (12 loc) 678 B
export declare function isValidFileName(name: string): boolean; export declare function isTextMimeType(mime: string | null | undefined): boolean; export declare function arrayBufferToBase64(buffer: ArrayBuffer): string; export declare function debounce<T extends (...args: any[]) => void>(fn: T, delay: number): T; /** * Parse the data contained within a PapyrosEvent using its contentType * Supported content types are: text/plain, text/json, image/png;base64 * @param {string} data The data to parse * @param {string} contentType The content type of the data * @return {any} The parsed data */ export declare function parseData(data: string, contentType?: string): any;