Skip to content

Files

Latest commit

0d5e792 · Sep 18, 2020

History

History

tmpa

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Sep 15, 2020
Sep 15, 2020
Sep 15, 2020
Sep 15, 2020
Sep 18, 2020
Sep 15, 2020

readme.md

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-…