{"_id":"remove-file-safe","_rev":"203954","name":"remove-file-safe","description":"Remove files without try catch","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"time":{"modified":"2023-03-21T13:34:48.000Z","created":"2020-10-04T01:29:24.210Z","3.0.0":"2023-01-12T00:43:50.040Z","2.0.0":"2021-06-08T23:02:44.100Z","1.0.1":"2020-10-04T17:38:04.274Z","1.0.0":"2020-10-04T01:29:24.210Z"},"users":{},"author":{"name":"Connor White"},"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/remove-file-safe.git"},"versions":{"3.0.0":{"name":"remove-file-safe","version":"3.0.0","description":"Remove files without try catch","license":"MIT","private":false,"author":{"name":"Connor White"},"contributors":[{"name":"Connor White"}],"homepage":"https://connorwhite.org/github/remove-file-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/remove-file-safe.git"},"bugs":{"url":"https://github.com/bconnorwhite/remove-file-safe/issues"},"keywords":["remove","file","files","safe","without","try","catch","fs-safe","rm","del","delete","trash"],"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"},"dependencies":{"is-path-inside":"^4.0.0"},"devDependencies":{"@types/mock-fs":"^4.13.0","@types/node":"^18.11.18","autorepo":"^0.1.9","mock-fs":"^5.0.0"},"eslintConfig":{"extends":"@autosoft/eslint-config"},"jest":{"preset":"@autosoft/jest-preset"},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-auto"},"_id":"remove-file-safe@3.0.0","dist":{"shasum":"3d33e153ec9792be769f1b1d69f52c374b6407c5","size":2710,"noattachment":false,"key":"/remove-file-safe/-/remove-file-safe-3.0.0.tgz","tarball":"http://name.csiicloud.com:7001/remove-file-safe/download/remove-file-safe-3.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/remove-file-safe_3.0.0_1673484229880_0.6672793880014869"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-12T00:43:50.040Z","publish_time":1673484230040,"_cnpm_publish_time":1673484230040},"2.0.0":{"name":"remove-file-safe","version":"2.0.0","description":"Remove files without try catch","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/remove-file-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/remove-file-safe.git"},"keywords":["remove","file","files","safe","without","try","catch","fs-safe","rm","del","delete","trash"],"main":"./build/index.js","scripts":{"build":"bob build","commit":"bob commit","lint":"bob lint","release":"bob publish","test":"bob test"},"dependencies":{"is-path-inside":"3.0.3"},"devDependencies":{"@bconnorwhite/bob":"^2.9.4","@types/mock-fs":"^4.13.0","@types/node":"^15.12.2","mock-fs":"^5.0.0"},"eslintConfig":{"extends":"eslint-config-bob"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"remove-file-safe@2.0.0","dist":{"shasum":"81cf84fc1442d81d564e70031494b28f6dae3100","size":2717,"noattachment":false,"key":"/remove-file-safe/-/remove-file-safe-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/remove-file-safe/download/remove-file-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/remove-file-safe_2.0.0_1623193363945_0.5539311740955917"},"_hasShrinkwrap":false,"publish_time":1623193364100,"_cnpm_publish_time":1623193364100,"_cnpmcore_publish_time":"2021-12-16T23:40:58.141Z"},"1.0.1":{"name":"remove-file-safe","version":"1.0.1","description":"Remove files without try catch","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/remove-file-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/remove-file-safe.git"},"keywords":["remove","file","files","safe","without","try","catch","fs-safe","rm","delete","trash"],"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":"remove-file-safe@1.0.1","dist":{"shasum":"550c1ec9c59fc115eb51de097a0052ef14b07061","size":2185,"noattachment":false,"key":"/remove-file-safe/-/remove-file-safe-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/remove-file-safe/download/remove-file-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/remove-file-safe_1.0.1_1601833084150_0.33097136104852876"},"_hasShrinkwrap":false,"publish_time":1601833084274,"_cnpm_publish_time":1601833084274,"_cnpmcore_publish_time":"2021-12-16T23:40:58.314Z"},"1.0.0":{"name":"remove-file-safe","version":"1.0.0","description":"Remove files without try catch","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/remove-file-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/remove-file-safe.git"},"keywords":["remove","file","files","safe","without","try","catch","fs-safe","rm","delete","trash"],"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":"remove-file-safe@1.0.0","dist":{"shasum":"a7d292f266675de9f81aef8d0e7c3eb4dbe85ff1","size":2113,"noattachment":false,"key":"/remove-file-safe/-/remove-file-safe-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/remove-file-safe/download/remove-file-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/remove-file-safe_1.0.0_1601774964078_0.8562566637375109"},"_hasShrinkwrap":false,"publish_time":1601774964210,"_cnpm_publish_time":1601774964210,"_cnpmcore_publish_time":"2021-12-16T23:40:58.520Z"}},"readme":"<!--BEGIN HEADER-->\n<div id=\"top\" align=\"center\">\n  <h1>remove-file-safe</h1>\n  <a href=\"https://npmjs.com/package/remove-file-safe\">\n    <img alt=\"NPM\" src=\"https://img.shields.io/npm/v/remove-file-safe.svg\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/remove-file-safe\">\n    <img alt=\"TypeScript\" src=\"https://img.shields.io/github/languages/top/bconnorwhite/remove-file-safe.svg\">\n  </a>\n  <a href=\"https://coveralls.io/github/bconnorwhite/remove-file-safe?branch=master\">\n    <img alt=\"Coverage Status\" src=\"https://img.shields.io/coveralls/github/bconnorwhite/remove-file-safe.svg?branch=master\">\n  </a>\n</div>\n\n<br />\n\n<blockquote align=\"center\">Remove files without try catch.</blockquote>\n\n<br />\n\n_If I should maintain this repo, please ⭐️_\n<a href=\"https://github.com/bconnorwhite/remove-file-safe\">\n  <img align=\"right\" alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/bconnorwhite/remove-file-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> Remove files without try catch.\n- Returns `true` if file no longer exists.\n- Returns `false` if unable to remove file.\n- Returns `undefined` on other errors (ex: permission denied) rather than throwing.\n\nUnless the `unsafe` flag is set, only files inside the current working directory or OS temp directory will be removed.\n\n## Installation\n\n```sh\nyarn add remove-file-safe\n```\n\n```sh\nnpm install remove-file-safe\n```\n\n```sh\npnpm add remove-file-safe\n```\n\n## Usage\n\n```ts\nimport { removeFile, removeFileSync, Options } from \"remove-file-safe\";\n\nfunction removeFile(path: string, options?: Options): Promise<boolean | undefined>;\n\nfunction removeFileSync(path: string, options?: Options): boolean | undefined;\n\ntype Options = {\n  /**\n   * Allow removals outside of current working directory, or OS temp directory. Default: `false`\n   */\n  unsafe?: boolean;\n};\n```\n<!--BEGIN FOOTER-->\n\n<br />\n\n<h2 id=\"dependencies\">Dependencies<a href=\"https://www.npmjs.com/package/remove-file-safe?activeTab=dependencies\"><img align=\"right\" alt=\"dependencies\" src=\"https://img.shields.io/librariesio/release/npm/remove-file-safe.svg\"></a></h2>\n\n- [is-path-inside](https://www.npmjs.com/package/is-path-inside): Check if a path is inside another path\n\n<br />\n\n<h3>Dev Dependencies</h3>\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<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/remove-file-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- [read-file-safe](https://www.npmjs.com/package/remove-file-safe): Read files without try catch\n- [write-file-safe](https://www.npmjs.com/package/write-file-safe): Write files, and parent directories if necessary\n- [read-dir-safe](https://www.npmjs.com/package/read-dir-safe): Read directories recursively or non-recursively\n- [write-dir-safe](https://www.npmjs.com/package/write-dir-safe): Create directories and their parents recursively\n- [remove-dir-safe](https://www.npmjs.com/package/remove-dir-safe): Remove directories recursively or non-recursively\n","_attachments":{},"homepage":"https://connorwhite.org/github/remove-file-safe","bugs":{"url":"https://github.com/bconnorwhite/remove-file-safe/issues"},"license":"MIT"}