Skip to content

Latest commit

 

History

History

tmpa

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

tmpa npm

Get unique temp file or dir path.

Install

$ yarn add tmpa

Usage

const getTempFilePath: (extension?: string) => Promise<string>

const getTempDirPath: (prefix?: string) => Promise<string>
import { getTempFilePath, getTempDirPath } from 'tmpa'

console.log(
  await getTempFilePath('png')
)
// /private/var/folders/…/….png

console.log(
  await getTempDirPath('prefix-')
)
// /private/var/folders/…/prefix-…