{"_id":"file-exists-safe","_rev":"219935","name":"file-exists-safe","description":"Check if a file exists without try catch","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"time":{"modified":"2021-06-03T15:39:22.000Z","created":"2020-10-03T01:59:19.289Z","1.1.0":"2021-04-13T04:30:50.999Z","1.0.2":"2020-10-04T17:16:37.407Z","1.0.1":"2020-10-04T17:14:09.014Z","1.0.0":"2020-10-03T01:59:19.289Z"},"users":{},"author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/file-exists-safe.git"},"versions":{"1.1.0":{"name":"file-exists-safe","version":"1.1.0","description":"Check if a file exists without try catch","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/file-exists-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/file-exists-safe.git"},"keywords":["file","exists","exist","check","if","safe","without","try","catch","fs-safe"],"main":"./build/index.js","scripts":{"build":"bob build","commit":"bob commit","lint":"bob lint","release":"bob publish","test":"bob test"},"devDependencies":{"@bconnorwhite/bob":"^2.9.4","@types/mock-fs":"^4.13.0","@types/node":"^14.14.37","mock-fs":"^4.13.0"},"eslintConfig":{"extends":"eslint-config-bob"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"file-exists-safe@1.1.0","dist":{"shasum":"db73e875853d47a371f1f3cbec9e6b321e9096df","size":2379,"noattachment":false,"key":"/file-exists-safe/-/file-exists-safe-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/file-exists-safe/download/file-exists-safe-1.1.0.tgz"},"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/file-exists-safe_1.1.0_1618288250834_0.19853357530363502"},"_hasShrinkwrap":false,"publish_time":1618288250999,"_cnpm_publish_time":1618288250999},"1.0.2":{"name":"file-exists-safe","version":"1.0.2","description":"Check if a file exists without try catch","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/file-exists-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/file-exists-safe.git"},"keywords":["file","exists","exist","check","if","safe","without","try","catch","fs-safe"],"main":"./build/index.js","scripts":{"build":"bob build","commit":"bob commit","lint":"bob lint","release":"bob publish","test":"bob test"},"devDependencies":{"@bconnorwhite/bob":"^2.9.2","@types/mock-fs":"^4.10.0","@types/node":"^14.11.2","mock-fs":"^4.13.0"},"eslintConfig":{"extends":"eslint-config-bob"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"file-exists-safe@1.0.2","dist":{"shasum":"7333d50000a20b7b09c9f7ce8fd1703f129975bb","size":2136,"noattachment":false,"key":"/file-exists-safe/-/file-exists-safe-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/file-exists-safe/download/file-exists-safe-1.0.2.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/file-exists-safe_1.0.2_1601831797280_0.35161357028991946"},"_hasShrinkwrap":false,"publish_time":1601831797407,"_cnpm_publish_time":1601831797407},"1.0.1":{"name":"file-exists-safe","version":"1.0.1","description":"Check if a file exists without try catch","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/file-exists-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/file-exists-safe.git"},"keywords":["file","exists","exist","check","if","safe","without","try","catch","fs-safe"],"main":"./build/index.js","scripts":{"build":"bob build","commit":"bob commit","lint":"bob lint","release":"bob publish","test":"bob test"},"devDependencies":{"@bconnorwhite/bob":"^2.9.2","@types/mock-fs":"^4.10.0","@types/node":"^14.11.2","mock-fs":"^4.13.0"},"eslintConfig":{"extends":"eslint-config-bob"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"file-exists-safe@1.0.1","dist":{"shasum":"5d394d49b4f87a5536cd13b1537545ba66236c38","size":2081,"noattachment":false,"key":"/file-exists-safe/-/file-exists-safe-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/file-exists-safe/download/file-exists-safe-1.0.1.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/file-exists-safe_1.0.1_1601831648856_0.4789336898539587"},"_hasShrinkwrap":false,"publish_time":1601831649014,"_cnpm_publish_time":1601831649014},"1.0.0":{"name":"file-exists-safe","version":"1.0.0","description":"Check if a file exists without a try catch","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/file-exists-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/file-exists-safe.git"},"keywords":["file","exists","exist","check","if","safe","without","try","catch","fs-safe"],"main":"./build/index.js","scripts":{"build":"bob build","commit":"bob commit","lint":"bob lint","release":"bob publish","test":"bob test"},"devDependencies":{"@bconnorwhite/bob":"^2.9.2","@types/mock-fs":"^4.10.0","@types/node":"^14.11.2","mock-fs":"^4.13.0"},"eslintConfig":{"extends":"eslint-config-bob"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"file-exists-safe@1.0.0","dist":{"shasum":"e235b5631a7f679576c4759652fa4bb3726f97bd","size":2034,"noattachment":false,"key":"/file-exists-safe/-/file-exists-safe-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/file-exists-safe/download/file-exists-safe-1.0.0.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/file-exists-safe_1.0.0_1601690359172_0.42026099913557613"},"_hasShrinkwrap":false,"publish_time":1601690359289,"_cnpm_publish_time":1601690359289}},"readme":"<div align=\"center\">\n  <a href=\"https://github.com/bconnorwhite/file-exists-safe\">\n    <img alt=\"file-exists-safe\" src=\"assets/header.svg\" />\n  </a>\n  <a href=\"https://npmjs.com/package/file-exists-safe\">\n    <img alt=\"NPM\" src=\"https://img.shields.io/npm/v/file-exists-safe.svg\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/file-exists-safe\">\n    <img alt=\"TypeScript\" src=\"https://img.shields.io/github/languages/top/bconnorwhite/file-exists-safe.svg\">\n  </a>\n  <a href='https://coveralls.io/github/bconnorwhite/file-exists-safe?branch=master'>\n    <img alt=\"Coverage Status\" src=\"https://img.shields.io/coveralls/github/bconnorwhite/file-exists-safe.svg?branch=master\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/file-exists-safe\">\n    <img alt=\"GitHub Stars\" src=\"https://img.shields.io/github/stars/bconnorwhite/file-exists-safe?label=Stars%20Appreciated%21&style=social\">\n  </a>\n  <a href=\"https://twitter.com/bconnorwhite\">\n    <img alt=\"Twitter Follow\" src=\"https://img.shields.io/twitter/follow/bconnorwhite.svg?label=%40bconnorwhite&style=social\">\n  </a>\n</div>\n\n<br />\n\n> Check if a file exists without try catch.\n\n- Returns `true` if the path exists and is a file.\n- Returns `false` if the path is not a file, or does not exist.\n- Returns `undefined` on other errors (for example, permission denied) rather than throwing.\n\n## Installation\n\n```sh\nyarn add file-exists-safe\n```\n\n```sh\nnpm install file-exists-safe\n```\n\n## API\n\n```ts\nimport { fileExists, fileExistsSync, Options } from \"file-exists-safe\";\n\nfunction fileExists(path: string, options?: Options): Promise<boolean | undefined>;\n\nfunction fileExistsSync(path: string, options?: Options): boolean | undefined;\n\ntype Options = {\n  /**\n   * Return true if path is directory. Default: `false`\n   */\n  includeDirectories?: boolean;\n}\n```\n\n<br />\n\n<h2>Dev Dependencies<img align=\"right\" alt=\"David\" src=\"https://img.shields.io/david/dev/bconnorwhite/file-exists-safe.svg\"></h2>\n\n- [@bconnorwhite/bob](https://www.npmjs.com/package/@bconnorwhite/bob): Bob is a toolkit for typescript projects\n- [@types/mock-fs](https://www.npmjs.com/package/@types/mock-fs): TypeScript definitions for mock-fs\n- [@types/node](https://www.npmjs.com/package/@types/node): TypeScript definitions for Node.js\n- [mock-fs](https://www.npmjs.com/package/mock-fs): A configurable mock file system.  You know, for testing.\n\n<br />\n\n<h2>License <img align=\"right\" alt=\"license\" src=\"https://img.shields.io/npm/l/file-exists-safe.svg\"></h2>\n\n[MIT](https://opensource.org/licenses/MIT)\n\n<br />\n\n## Related Packages\n\n- [fs-safe](https://www.npmjs.com/package/fs-safe): A simple fs wrapper that doesn't throw\n- [dir-exists-safe](https://www.npmjs.com/package/dir-exists-safe): Check if a directory exists without a try catch\n","_attachments":{},"homepage":"https://connorwhite.org/github/file-exists-safe","license":"MIT"}