@ezy/webp
Version:
libwebp wrapper for nodejs
21 lines (20 loc) • 644 B
TypeScript
/**
* ### Description
* Call a libwebp binary
*
* ### Examples
* #### using promise
* ```js
* await execute('cwebp', ['-version'])
* ```
* #### using node-callback
* ```js
* execute('cwebp', ['-version'], (err, version) => err? console.error(err) : console.log(version))
* ```
*
* @param name name of the libwebp bin to execute
* @param options list of options to pass to the libwebp bin
* @param cb callback function
*/
export declare function execute(name: string, options: string[]): Promise<string>;
export declare function execute(name: string, options: string[], cb: (err: Error | void, result?: string) => void): void;