@augment-vir/node
Version:
A collection of augments, helpers types, functions, and classes only for Node.js (backend) JavaScript environments.
10 lines (9 loc) • 388 B
TypeScript
/**
* Reads a file if it exists, or just return `undefined`.
*
* @category Node : File
* @category Package : @augment-vir/node
* @returns The file contents as a string if the file exists, otherwise `undefined`.
* @package [`@augment-vir/node`](https://www.npmjs.com/package/@augment-vir/node)
*/
export declare function readFileIfExists(path: string): Promise<string | undefined>;