{"name":"disposable-directory","version":"6.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","esm","mjs"],"sideEffects":false,"exports":{".":"./disposableDirectory.mjs","./disposableDirectory.mjs":"./disposableDirectory.mjs","./package.json":"./package.json"},"engines":{"node":"^14.17.0 || ^16.0.0 || >= 18.0.0"},"dependencies":{"@types/node":"*"},"devDependencies":{"coverage-node":"^7.0.0","eslint":"^8.22.0","eslint-plugin-simple-import-sort":"^7.0.0","prettier":"^2.7.1","test-director":"^9.0.0","typescript":"^4.7.4"},"scripts":{"eslint":"eslint .","prettier":"prettier -c .","types":"tsc -p jsconfig.json","tests":"coverage-node test.mjs","test":"npm run eslint && npm run prettier && npm run types && npm run tests","prepublishOnly":"npm test"},"gitHead":"fcd1b8d0110d1563e41d9f5e6a5e121ac2753ef6","_id":"disposable-directory@6.0.0","_nodeVersion":"18.7.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-bODF6KKbdKL9fxqhJCTqF8r7/GPhbrXk+HpT4gGhCIiG1uire8cLiorRUBFssXmVCySNLe7WbGwgL5QqN17XAg==","shasum":"2db2ea874c178bc5350c6c9e2ce2fddb0914c706","tarball":"http://registry-npm.ywwl.com/disposable-directory/download/disposable-directory-6.0.0.tgz","fileCount":5,"unpackedSize":6356,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdxbGmx3UyWKbiyZFgQwXs60CWCtUmnv1O2bNn44L8WwIgfyL5jbeo7xHOHLFa2p83BdVJeVBhuxHj0w5UY+PQ2sQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/a5zACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVHg//ZIrdj05I0qHVwPFPa3s1ruiL6dUQp8zU/5eGkdwY4IntYoZj\r\n8ocM5Ixrqube47sewr8ksp7yjAoDYEfdW935AlUpRSak9JkA5v/sZTCEid/L\r\nAjFAelvJdb/j2qOBBCWaoEDHt230Ql9AolMh9Lgq5QD4gTQKxRaVpFwcseqH\r\nX3hHbB4c/5DQSaqmRJVaUIML93WHhKWdRqfeAIXbJ3LVBubteflo/c6XP6Vk\r\n8+4+Z9sLMnWn/7uW6xdeHsPB9UnQIDfSZefF+X46nSHjxJ01uZPP/zr8L5Tr\r\nExDkHytHEYHt7rLs84Fd7rw7UVSLMjNh0ABeTtf2LDuayINAoVD632WWBjsZ\r\nsnibyf7+6N+9f2cd/Wnm0cSo5u7Rfk+LShv8g6f4C/nDKzfqtR/L4iDLGCjj\r\n4Et/orwxqHZO7Iego5yxJe1W5yMBYO76YsI1e7OhSLA43qiOlCwd392gJV51\r\n6b95kG5kKprO9qSWKTlaUeyESfudXd3TOx4UXCcZS3FsPTcAOeNuvywia8LW\r\ni99WPZoXtMEspYkCLubhPtDHqLJ+Lj6WYAIXLlszlcq+g58Qc/263o6fqm1l\r\nvBvaPwD2sNKKqEKQS9+mDRLEyp5WE7rJ8HEyIMe93jO90uOgLMlWKP+yB0cI\r\nWGq6D0Zz73kbGGyCKT4BsR7alEKQ36MvmjQ=\r\n=H+pV\r\n-----END PGP SIGNATURE-----\r\n","size":2587,"noattachment":false,"key":"/disposable-directory/-/disposable-directory-6.0.0.tgz"},"_npmUser":{"name":"jaydenseric","email":"me@jaydenseric.com"},"directories":{},"maintainers":[{"name":"jaydenseric","email":"me@jaydenseric.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/disposable-directory_6.0.0_1660792434776_0.5143613376507639"},"_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":1660792435016,"_cnpm_publish_time":1660792435016,"dist-tags":{"latest":"6.0.0"}}