npm.io
0.1.0 • Published 6 years ago

tmpa

Licence
MIT
Version
0.1.0
Deps
2
Size
3 kB
Vulns
0
Weekly
0
Stars
81

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

Keywords