then-tmp
v1.0.2
Published
Promised version of the node.js [tmp](https://www.npmjs.com/package/tmp) module.
Downloads
8,320
Readme
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
- babel-cli: Babel command line.
- babel-core: Babel compiler core.
- babel-plugin-syntax-async-functions: Allow parsing of async functions
- babel-plugin-transform-async-to-generator: Turn async functions into ES2015 generators
- babel-preset-es2015-node4: Babel preset to make node@4 ES2015 compatible.
- babel-tape-runner: Babel + Tape for running your ES Next tests
- package-json-to-readme: Generate a README.md from package.json contents
- tapava: the syntax of ava, run through tape
- then-fs: promised FS
- xo: JavaScript happiness style linter ❤️
License
MIT
Generated by package-json-to-readme