Check if a file exists without try catch.
trueif the path exists and is a file.
falseif the path is not a file, or does not exist.
undefinedon other errors (for example, permission denied) rather than throwing.
yarn add file-exists-safe
npm install file-exists-safe
- @bconnorwhite/bob: Bob is a toolkit for typescript projects
- @types/mock-fs: TypeScript definitions for mock-fs
- @types/node: TypeScript definitions for Node.js
- mock-fs: A configurable mock file system. You know, for testing.