then-tmp
Promised version of the node.js tmp module.
Installation
Download node at nodejs.org and install it, if you haven't already.
npm install then-tmp --save
Usage
/* eslint-disable no-unused-vars */
/* eslint-disable import/no-extraneous-dependencies */
import tmp from 'then-tmp';
tmp.file().then(({path, fd, cleanupCallback}) => {
});
tmp.dir().then(({path, cleanupCallback}) => {
});
tmp.tmpName().then(path => {
});
// *Sync-methods are aliases to the tmp module
const {name: fileName} = tmp.fileSync();
const {name: dirName} = tmp.dirSync();
const tmpName = tmp.tmpNameSync();
Tests
npm install
npm test
Dependencies
- promisify-function: Turn a callback-style function into a function that returns a promise
- tmp: Temporary file and directory creator
Dev Dependencies
License
MIT
Generated by package-json-to-readme