0.1.0 • Published 4 years ago

tmpa v0.1.0

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

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