{"name":"disposable-directory","version":"5.0.2","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,"main":"./disposableDirectory.mjs","exports":{".":"./disposableDirectory.mjs","./disposableDirectory.mjs":"./disposableDirectory.mjs","./package.json":"./package.json"},"engines":{"node":"^12.22.0 || ^14.17.0 || >= 16.0.0"},"dependencies":{"@types/node":"*"},"devDependencies":{"coverage-node":"^6.0.1","eslint":"^8.8.0","eslint-plugin-simple-import-sort":"^7.0.0","prettier":"^2.5.1","test-director":"^8.0.2","typescript":"^4.6.0-dev.20211226"},"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":"746199abedad216bb731835d4b681059e892a849","_id":"disposable-directory@5.0.2","_nodeVersion":"17.4.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-7uR3uBMQZYceF+64Mii7eTi3hDJm/CcjdHvB+O5Ft10X2S+u0LdyF5sHPsxTjB58R8pnyR6VnhgRaDBs788Q5Q==","shasum":"8b13953b521dc0cb545e207791e1df884c63cb4b","tarball":"http://registry-npm.ywwl.com/disposable-directory/download/disposable-directory-5.0.2.tgz","fileCount":6,"unpackedSize":6213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiA5QaCRA9TVsSAnZWagAA9XwP/3jCSGeZeO3sEEXDMVvY\nLRfCXY9BM9sljjSif4veP3aVBMSIJbabCT/9msemNJFfvYHB+tIOXNVIeORw\n6rj1PHdTyvCj3kHFK/mRjwLU+3Gq7MAEwgTV2RgLcfaWwIDUlJaaHwACo869\nbehv1YCC74D3mDlird0KXKkb9uDm/t+uT/yC5K8BPNuYF6jUU+LZUSLu1BWV\nRqPmguhBWcjfW6KMJGyCFFoG6NTOG01kd+NEZbPs3HQVkpXbIlNyiGFBdfgu\ndak3kjAfTWsjrCXfwrEbpxWwuIlf1gd0X9Eb0kcBSO019eEpB/ABzhhY/N+W\n1ADJZVHmYEW4X1ccZZPiG52tHQAkc2aBMopkjAubTZtDxtIpwlkbprcOEWsI\nPpz836882tyh1zlYVTKsSfVvpra3JFOXI8KSynutv9Qw75gxSEPghc4tEh8b\ntzKuHf+AwOJT7Y+ajcHrT9qnin2KPbzlyDzrfNv5VjCiTs7WGqqaeNkjidls\nqd89mBl9i3krdT1f/wUa9/AM2tnCbmq9LrnOyLuqXhANz9nqhSWcwOgB7G08\naEvfEESj4xcLAJCoSdx7aAcXMCl5bzEWv5H4Y/zKRRRUDxsQvjmrBDo8I5MT\nzusWjsHh10CE5FofMhALtxHnLRnQt51/spdv0oa5zuuTMRTa2qKMiit7YH8g\nNu34\r\n=63t5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxVlsZTp/iEiV8fSt944avmm1dvFS5jqrvx/4KTFQ7XwIhAM1kbpC4pLNAKQGS4F1eKubPKeeWBv5dIUgBb2GDztKC"}],"size":2532,"noattachment":false,"key":"/disposable-directory/-/disposable-directory-5.0.2.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_5.0.2_1644401690451_0.6638586031028102"},"_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":1644401690587,"_cnpm_publish_time":1644401690587,"dist-tags":{"latest":"6.0.0"}}