https://github.com/bcomnes/p-temporary-directory
Async/promise tmp dirs with cleanup.
https://github.com/bcomnes/p-temporary-directory
Last synced: 3 months ago
JSON representation
Async/promise tmp dirs with cleanup.
- Host: GitHub
- URL: https://github.com/bcomnes/p-temporary-directory
- Owner: bcomnes
- Created: 2019-07-29T14:37:01.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T17:50:10.000Z (9 months ago)
- Last Synced: 2025-03-29T19:11:14.267Z (4 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/p-temporary-directory
- Size: 75.2 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# p-temporary-directory
[](https://www.npmjs.com/package/p-temporary-directory)
[](https://github.com/bcomnes/p-temporary-directory/actions)
[](https://coveralls.io/github/bcomnes/p-temporary-directory?branch=master)
[](https://npmtrends.com/p-temporary-directory)The same as [temporary-directory](https://github.com/maxogden/temporary-directory) but with promises.
```
npm install p-temporary-directory
```## Usage
``` js
const tmp = require('p-temporary-directory')
const tmpCb = require('p-temporary-directory/cb') // same as temporary-directoryasync function usuallyATest() {
const [dir, cleanup] = await tmp()
// use dir
//...await cleanup()
}
```## License
MIT