Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bcomnes/p-temporary-directory
Async/promise tmp dirs with cleanup.
https://github.com/bcomnes/p-temporary-directory
Last synced: 5 days 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T17:50:10.000Z (20 days ago)
- Last Synced: 2024-10-26T02:11:42.479Z (19 days ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/p-temporary-directory
- Size: 75.2 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# p-temporary-directory
[![latest version](https://img.shields.io/npm/v/p-temporary-directory.svg)](https://www.npmjs.com/package/p-temporary-directory)
[![Actions Status](https://github.com/bcomnes/p-temporary-directory/workflows/tests/badge.svg)](https://github.com/bcomnes/p-temporary-directory/actions)
[![Coverage Status](https://coveralls.io/repos/github/bcomnes/p-temporary-directory/badge.svg?branch=master)](https://coveralls.io/github/bcomnes/p-temporary-directory?branch=master)
[![downloads](https://img.shields.io/npm/dm/p-temporary-directory.svg)](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