# quick-tmp

> Quickly and synchronously retrieve a temporary directory name for you to use

Latest version **1.0.0** (published 2016-01-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install quick-tmp
pnpm add quick-tmp
yarn add quick-tmp
bun add quick-tmp
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-01-02 |
| First published | 2014-01-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Hugh Kennedy |
| Maintainers | hughsk |
| Keywords | tmp, synchronous, quick, temporary, directory |

## Links

- npm: https://www.npmjs.com/package/quick-tmp
- Repository: https://github.com/hughsk/quick-tmp
- Issues: https://github.com/hughsk/quick-tmp/issues
- npm.io page: https://npm.io/package/quick-tmp

## Dependencies (2)

- [osenv](https://npm.io/package/osenv.md) 0.0.3
- [first-match](https://npm.io/package/first-match.md) 0.0.1

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-01-02
- 0.0.0 — 2014-01-25

## README

# quick-tmp [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/quick-tmp&title=quick-tmp&description=hughsk/quick-tmp%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #

Quickly and synchronously retrieve a temporary directory name for you to use.

Using the name generation from the [tmp](https://github.com/raszi/node-tmp/blob/master/lib/tmp.js#L110-L118)
module, but allowing you to handle writing and removing of directories/files.

## Usage ##

[![quick-tmp](https://nodei.co/npm/quick-tmp.png?mini=true)](https://nodei.co/npm/quick-tmp)

### `getDirectory = quickTmp([prefix])` ###

Configures the temporary directory's `prefix`, which defaults to `'quicktmp'`.

### `directory = getDirectory([retries])` ###

Return a random temporary directory name. You'll have to create the directory
yourself. `retries` determines how many times to try finding a folder not
that doesn't already exist, and defaults to 10.

``` javascript
// straight away:
var directory = require('quick-tmp')('prefix')()
// or later:
var getDirectory = require('quick-tmp')('prefix')
getDirectory()
// => '/var/folders/43/z7pv8pvd4x57nt_1zz2561tw0000gn/T/prefix-43831t6vveao'
```

## License ##

MIT. See [LICENSE.md](http://github.com/hughsk/quick-tmp/blob/master/LICENSE.md) for details.

---
_Source: https://npm.io/package/quick-tmp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
