Very lightweight and simply temporary file creator
npm install tmpfilenpm install tmpfile or yarn add tmpfile
const tmpfile = require('tmpfile');
const tmpFileOpts = {
prefix: 'bill-',
suffix: '-accounting',
extension: '.txt'
};const filePath = tmpfile(tmpFileOpts);
`Notes
* Files are not created by this package! The paths returned are confirmed as available and valid for you to use yourself.
* Paths will always be in your OS's temp directory, e.g. /tmp` for (most?) Linux distributions.