@the-/tmp
v15.5.0
Published
Tmp file creator
Downloads
131
Readme
@the-/tmp
Tmp file creator
Installation
$ npm install @the-/tmp --save
Usage
'use strict'
const theTmp = require('@the-/tmp')
async function tryExample() {
// Create tmp file and clean up automatically
await theTmp.while(async (filename) => {
console.log('Generated file', filename)
})
// Manually cleanup
{
const { cleanup, filename } = await theTmp.generate()
console.log('Generated file', filename)
cleanup() // Cleanup the file
}
}
tryExample().catch((err) => console.error(err))
API Guide
- global
- module:@the-/tmp
- TheTmp
See API Guide for more detail
License
This software is released under the MIT License.