{"name":"disposable-directory","version":"2.0.0","description":"Asynchronously creates a disposable directory in the OS temporary directory that gets deleted after the callback is done or errors.","license":"MIT","author":{"name":"Jayden Seric","email":"me@jaydenseric.com","url":"https://jaydenseric.com"},"repository":{"type":"git","url":"git+https://github.com/jaydenseric/disposable-directory.git"},"homepage":"https://github.com/jaydenseric/disposable-directory#readme","bugs":{"url":"https://github.com/jaydenseric/disposable-directory/issues"},"funding":"https://github.com/sponsors/jaydenseric","keywords":["disposable","temporary","directory","tmp","dir"],"sideEffects":false,"module":"lib/index.mjs","main":"lib","exports":{".":{"import":"./lib/index.mjs","require":"./lib/index.js"},"./lib/":"./lib/","./package":"./package.json","./package.json":"./package.json"},"engines":{"node":"10 - 12 || >= 13.7"},"devDependencies":{"coverage-node":"^2.0.3","eslint":"^6.7.2","eslint-config-env":"^13.0.4","eslint-config-prettier":"^6.10.1","eslint-plugin-import":"^2.20.2","eslint-plugin-jsdoc":"^22.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^3.1.2","hard-rejection":"^2.1.0","jsdoc-md":"^5.0.1","prettier":"^2.0.4","test-director":"^4.0.0"},"scripts":{"prepare":"npm run prepare:jsdoc && npm run prepare:prettier","prepare:jsdoc":"jsdoc-md","prepare:prettier":"prettier --write readme.md","test":"npm run test:eslint && npm run test:prettier && npm run test:api","test:eslint":"eslint --ext mjs,js .","test:prettier":"prettier -c .","test:api":"coverage-node -r hard-rejection/register test","prepublishOnly":"npm test"},"gitHead":"f2418b1640892a16538ee06275c17589ca8d70cb","_id":"disposable-directory@2.0.0","_nodeVersion":"13.12.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-/KpxMYC3JGub0Vir4idH6pNtO6IGOL5IA7HGGLlihqcwhjL9GCeFlnXSmVFPKQeYY2gx0YfKJxfBagFutfLUBQ==","shasum":"12719d0e3f58de81ba2218c965e732534d34981e","tarball":"http://registry-npm.ywwl.com/disposable-directory/download/disposable-directory-2.0.0.tgz","fileCount":8,"unpackedSize":6705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelChaCRA9TVsSAnZWagAAK7sP/iYFNEx8K9Vv4xO5+IQ+\nzINN6ZEwSqwzGmKt+ZD6dkJ5RuZtbEgSfz57JFya337A8GiByUgOGuXS6ICw\nxbttynneIuY5EU8rABpv8WBueAPBO0hfz5zuH6wr1C2BAFt7vEgf8kW867EV\nCVM5qZeO3tmY6hNN8oIo1LSYtKyp9uqHj+0CXQ16OrtpDrwtGzOmB9iVUA14\nBtEBy9hHYX0cN+M+5Bj+bKtpo3qtlhxsT4yA99VAlOPlml8hLa0HYjOvW7Fh\nW1WbHoVx3oiDQIYP25pKOujKeUXGUfdjJCUFS2FrWrXfCidf8YzfEipHQe6L\npNGYIY7dpjlQ8u7xpozFAT6wkkKxB/NK/3PrnW3pWrfTWbRnGIvDWDym3f5p\nWiIKwBWCgSouNyL6vWutJo6BSGUua9mdwsJnxjhrTIUyANS7rIqPqGkTZ6de\nb5oBBGzW01Pa43ItX5QuZzogdBtaW7sN4tz2ALDOPL8poLOqiR5HD8G4EwZf\nktWmW6Lc/1iDcM8zWpaV09eGaRm5+0/GR6fKIlU5RQBCStBLs0OUsRM+g98f\nh3rh3Khg0Y4GG9z/uNjfXRQdX0LWO38wvekVUNAQkS+BjeQZdReKP9PO3wBt\nJXTh8gLN8gZzpamN1UWcm1fM77B0HaAJfQUqfq1nmWONHxlhAFoQHSK44Csr\nXJpB\r\n=cMcX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZQlRqgunD1TPriThbZTE0ZILSCxx9OuBE6iimxV3BPAIgQVU7yl2ZW3TU07tAqa6E50otqRZ+hgU0mAkHnJxM5/Q="}],"size":2580,"noattachment":false,"key":"/disposable-directory/-/disposable-directory-2.0.0.tgz"},"maintainers":[{"name":"jaydenseric","email":"me@jaydenseric.com"}],"_npmUser":{"name":"jaydenseric","email":"me@jaydenseric.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/disposable-directory_2.0.0_1586767961882_0.7537737682043333"},"_hasShrinkwrap":false,"readme":"# disposable-directory\n\nAsynchronously creates a disposable directory in the OS temporary directory that gets deleted after the callback is done or errors.\n\n## Installation\n\nTo install [`disposable-directory`](https://npm.im/disposable-directory) with [npm](https://npmjs.com/get-npm), run:\n\n```sh\nnpm install disposable-directory\n```\n\nThen, import and use the function [`disposableDirectory`](./disposableDirectory.mjs).\n\n## Examples\n\nHow to use a disposable directory:\n\n```js\nimport disposableDirectory from \"disposable-directory\";\n\ndisposableDirectory(async (directoryPath) => {\n  // Use the directory here.\n})\n  .then(() => {\n    // The directory is gone.\n  })\n  .catch(() => {\n    // The directory is gone.\n  });\n```\n\n## Requirements\n\nSupported operating systems:\n\n- Linux\n- macOS\n\nSupported runtime environments:\n\n- [Node.js](https://nodejs.org) versions `^14.17.0 || ^16.0.0 || >= 18.0.0`.\n\nProjects must configure [TypeScript](https://typescriptlang.org) to use types from the ECMAScript modules that have a `// @ts-check` comment:\n\n- [`compilerOptions.allowJs`](https://typescriptlang.org/tsconfig#allowJs) should be `true`.\n- [`compilerOptions.maxNodeModuleJsDepth`](https://typescriptlang.org/tsconfig#maxNodeModuleJsDepth) should be reasonably large, e.g. `10`.\n- [`compilerOptions.module`](https://typescriptlang.org/tsconfig#module) should be `\"node16\"` or `\"nodenext\"`.\n\n## Exports\n\nThe [npm](https://npmjs.com) package [`disposable-directory`](https://npm.im/disposable-directory) features [optimal JavaScript module design](https://jaydenseric.com/blog/optimal-javascript-module-design). These ECMAScript modules are exported via the [`package.json`](./package.json) field [`exports`](https://nodejs.org/api/packages.html#exports):\n\n- [`disposableDirectory.mjs`](./disposableDirectory.mjs)\n","publish_time":1586767962031,"_cnpm_publish_time":1586767962031,"dist-tags":{"latest":"6.0.0"}}