UNPKG

tensorflow-helpers

Version:

Helper functions to use tensorflow in nodejs for transfer learning, image classification, and more

16 lines (15 loc) 599 B
/** * @description * - rename filename to content hash + extname; * - return list of (renamed) filenames */ export declare function scanDir(dir: string): Promise<string[]>; export declare function isContentHash(file_or_filename: string): boolean; export declare function saveFile(args: { dir: string; content: Buffer; mimeType: string; }): Promise<void>; export declare function hashContent(content: Buffer, encoding?: BufferEncoding): string; /** @returns new filename with content hash and extname */ export declare function renameFileByContentHash(file: string): Promise<string>;