/** * @module util/dataUri */ /** * Test that a string is a Data URI * * @param str A string to test */ export declare function match(str: string): boolean; /** * Write a Data URI to file * * @param dataUri The data URI to write. * @param filePath The path of the file to write to (defaults to a temporary file) */ export declare function toFile(dataUri: string, filePath?: string): Promise<{ mediaType: string; filePath: string; }>; /** * Create a Data URI from file. * * @param filePath The file path to read. * @param mediaType The media type of the file (inferred from file extension if not provided) */ export declare function fromFile(filePath: string, mediaType?: string): Promise<{ mediaType: string; dataUri: string; }>; /** * Create a Data URI from a JavaScript object. * * JSON stringifies and then base64 encodes the object. * * @param object The object to encode * @param mediaType The media type to encode into the Data URI */ export declare function fromJS(object: object, mediaType?: string): string;