UNPKG

node-base64-image

Version:

Download images from remote URLs and encode/decode them to base64

17 lines (15 loc) 475 B
interface EncodeOptions { string?: boolean; local?: boolean; timeout?: number; headers?: { [key: string]: string | number; }; } interface DecodeOptions { fname: string; ext: string; } declare function encode(url: string, opts?: EncodeOptions): Promise<string | Buffer>; declare function decode(imgBuffer: string | Buffer, opts: Required<DecodeOptions>): Promise<string>; export { type DecodeOptions, type EncodeOptions, decode, encode };