15.5.0 • Published 4 years ago

@the-/tmp v15.5.0

Weekly downloads
1,217
License
MIT
Repository
github
Last release
4 years ago

@the-/tmp

npm Version

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

See API Guide for more detail

License

This software is released under the MIT License.

Links

15.5.0

4 years ago

15.4.5

5 years ago

15.4.1

5 years ago

15.2.3

5 years ago

15.2.0

5 years ago

15.1.4

5 years ago

15.1.3

5 years ago

15.1.2

5 years ago

15.1.0

5 years ago

15.0.3

5 years ago

15.0.2

5 years ago