Tmp file creator
npm install @the-/tmp@the-/tmp
==========
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[bd_repo_url]: https://github.com/the-labo/the
[bd_npm_url]: http://www.npmjs.org/package/@the-/tmp
[bd_npm_shield_url]: http://img.shields.io/npm/v/@the-/tmp.svg?style=flat
Tmp file creator
Installation
-----
``bash`
$ npm install @the-/tmp --save
Usage
---------
`javascript
'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))
``
- global
- GenerateDirResult
- GenerateResult
- module:@the-/tmp
- .create(args)
- .default()
- .TheTmp
- TheTmp
- #generate(options)
- #generateDir(options)
- #generateDirSync(options)
- #generateSync(options)
- #while(handler,options)
- #whileDir(handler,options)
See API Guide for more detail
License
-------
This software is released under the MIT License.
Links
------
+ [THE Labo][the_labo_url]
[the_labo_url]: https://github.com/the-labo