1.1.0 • Published 9 years ago
mkdirtemp v1.1.0
mkdirtemp 
Create a unique temporary directory.
Why?
- Fixes the awkward
fs.mkdtemp()API. - Supports
asyncandawait. - Sensible defaults.
Install
npm install mkdirtemp --saveUsage
Get it into your program.
const mkdirtemp = require('mkdirtemp');Make a new and unique temporary directory.
mkdirtemp().then((dirPath) => {
console.log(dirPath);
// => /var/folders/gr/qfsxs2gj0fq1ypdsfd8rj8tr0000gn/T/MKufpq
});API
mkdirtemp(cwd)
Returns a Promise for the path of the new directory.
cwd
Type: string
Default: os.tmpdir()
Parent of the new directory once it is created.
Contributing
See our contributing guidelines for more details.
- Fork it.
- Make a feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request.
License
Go make something, dang it.