{"_id":"file-exists-safe","_rev":"203950","name":"file-exists-safe","description":"Check if a file exists without try catch","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"time":{"modified":"2023-03-21T13:34:47.000Z","created":"2020-10-03T01:59:19.289Z","2.0.0":"2023-01-12T00:02:33.764Z","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"},"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/file-exists-safe.git"},"versions":{"2.0.0":{"name":"file-exists-safe","version":"2.0.0","description":"Check if a file exists without try catch","license":"MIT","private":false,"author":{"name":"Connor White"},"contributors":[{"name":"Connor White"}],"homepage":"https://github.com/bconnorwhite/file-exists-safe#readme","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/file-exists-safe.git"},"bugs":{"url":"https://github.com/bconnorwhite/file-exists-safe/issues"},"keywords":["file","exists","exist","check","if","safe","without","try","catch","fs-safe"],"type":"module","main":".auto/build/index.js","exports":"./.auto/build/index.js","types":".auto/build/index.d.ts","engines":{"node":"^14.13.1 || >=16.0.0"},"scripts":{"build":"auto build","dev":"auto dev","lint":"auto lint","prepack":"yarn build","release":"auto release","test":"auto test","typecheck":"auto typecheck"},"devDependencies":{"@types/mock-fs":"^4.13.0","@types/node":"^14.14.37","autorepo":"^0.1.9","mock-fs":"^4.13.0"},"eslintConfig":{"extends":"@autosoft/eslint-config"},"jest":{"preset":"@autosoft/jest-preset"},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-auto"},"_id":"file-exists-safe@2.0.0","dist":{"shasum":"896c02174284c063b9de583896ca84d586030078","size":2397,"noattachment":false,"key":"/file-exists-safe/-/file-exists-safe-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/file-exists-safe/download/file-exists-safe-2.0.0.tgz"},"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/file-exists-safe_2.0.0_1673481753600_0.07098766570262605"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-12T00:02:33.764Z","publish_time":1673481753764,"_cnpm_publish_time":1673481753764},"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://name.csiicloud.com:7001/file-exists-safe/download/file-exists-safe-1.1.0.tgz"},"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_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,"_cnpmcore_publish_time":"2021-12-16T23:40:57.446Z"},"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://name.csiicloud.com:7001/file-exists-safe/download/file-exists-safe-1.0.2.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_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,"_cnpmcore_publish_time":"2021-12-16T23:40:57.629Z"},"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://name.csiicloud.com:7001/file-exists-safe/download/file-exists-safe-1.0.1.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_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,"_cnpmcore_publish_time":"2021-12-16T23:40:58.244Z"},"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://name.csiicloud.com:7001/file-exists-safe/download/file-exists-safe-1.0.0.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_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,"_cnpmcore_publish_time":"2021-12-16T23:40:58.466Z"}},"readme":"<!--BEGIN HEADER-->\n<div id=\"top\" align=\"center\">\n  <h1>file-exists-safe</h1>\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</div>\n\n<br />\n\n<blockquote align=\"center\">Check if a file exists without try catch.</blockquote>\n\n<br />\n\n_If I should maintain this repo, please ⭐️_\n<a href=\"https://github.com/bconnorwhite/file-exists-safe\">\n  <img align=\"right\" alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/bconnorwhite/file-exists-safe?label=%E2%AD%90%EF%B8%8F&style=social\">\n</a>\n\n_DM me on [Twitter](https://twitter.com/bconnorwhite) if you have questions or suggestions._\n<a href=\"https://twitter.com/bconnorwhite\">\n  <img align=\"right\" alt=\"Twitter\" src=\"https://img.shields.io/twitter/url?label=%40bconnorwhite&style=social&url=https%3A%2F%2Ftwitter.com%2Fbconnorwhite\">\n</a>\n\n---\n<!--END HEADER-->\n\n> Check if a file exists without try catch.\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```sh\npnpm add file-exists-safe\n```\n\n## Usage\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<!--BEGIN FOOTER-->\n\n<br />\n\n<h2>Dev Dependencies</h2>\n\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- [autorepo](https://www.npmjs.com/package/autorepo): Autorepo abstracts away your dev dependencies, providing a single command to run all of your scripts.\n- [mock-fs](https://www.npmjs.com/package/mock-fs): A configurable mock file system.  You know, for testing.\n\n\n<br />\n\n<h2 id=\"license\">License <a href=\"https://opensource.org/licenses/MIT\"><img align=\"right\" alt=\"license\" src=\"https://img.shields.io/npm/l/file-exists-safe.svg\"></a></h2>\n\n[MIT](https://opensource.org/licenses/MIT)\n<!--END FOOTER-->\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://github.com/bconnorwhite/file-exists-safe#readme","bugs":{"url":"https://github.com/bconnorwhite/file-exists-safe/issues"},"license":"MIT"}