Create a unique temporary directory.
npm install mkdirtemp> Create a unique temporary directory.
- Fixes the awkward fs.mkdtemp() API.
- Supports async and await.
- Sensible defaults.
``sh`
npm install mkdirtemp --save
Get it into your program.
`js`
const mkdirtemp = require('mkdirtemp');
Make a new and unique temporary directory.
`js`
mkdirtemp().then((dirPath) => {
console.log(dirPath);
// => /var/folders/gr/qfsxs2gj0fq1ypdsfd8rj8tr0000gn/T/MKufpq
});
Returns a Promise for the path of the new directory.
#### cwd
Type: stringos.tmpdir()
Default:
Parent of the new directory once it is created.
See our contributing guidelines for more details.
1. Fork it.
2. Make a feature branch: git checkout -b my-new-featuregit commit -am 'Add some feature'
3. Commit your changes: git push origin my-new-feature`
4. Push to the branch:
5. Submit a pull request.
Go make something, dang it.