tmpa
v0.1.0
Published
Get unique temp file or dir path
Downloads
6
Readme
tmpa
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-…