# tmpr

> Creates a temorary directory and gives you the path to it.

Latest version **1.0.3** (published 2015-04-25) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install tmpr
pnpm add tmpr
yarn add tmpr
bun add tmpr
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2015-04-25 |
| First published | 2015-04-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Bret Comnes |
| Maintainers | bret |
| Keywords | temporary, directory |

## Links

- npm: https://www.npmjs.com/package/tmpr
- Repository: https://github.com/bcomnes/node-tmpr
- Homepage: https://github.com/bcomnes/node-tmpr#readme
- Issues: https://github.com/bcomnes/node-tmpr/issues
- npm.io page: https://npm.io/package/tmpr

## Dependencies (1)

- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.0

## 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.3 (latest) — 2015-04-25
- 1.0.2 — 2015-04-24
- 1.0.1 — 2015-04-23
- 1.0.0 — 2015-04-23

## README

# tmpr

[![release][release-image]][release-url]
[![npm][npm-image]][npm-url]
[![travis][travis-image]][travis-url]
[![coverage][coverage-image]][coverage-url]
[![david][david-image]][david-url]
[![stability][stability-image]][stability-url]

[release-image]: https://img.shields.io/github/release/bcomnes/node-tmpr.svg?style=flat-square
[release-url]: https://github.com/bcomnes/node-tmpr/releases/latest
[npm-image]: https://img.shields.io/npm/v/tmpr.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/tmpr
[travis-image]: https://img.shields.io/travis/bcomnes/node-tmpr.svg?style=flat-square
[travis-url]: https://travis-ci.org/bcomnes/node-tmpr
[coverage-image]: https://img.shields.io/codeclimate/coverage/github/bcomnes/node-tmpr.svg?style=flat-square
[coverage-url]: https://codeclimate.com/github/bcomnes/node-tmpr
[david-image]: https://img.shields.io/david/bcomnes/node-tmpr.svg?style=flat-square
[david-url]: https://david-dm.org/bcomnes/node-tmpr
[stability-image]: https://img.shields.io/badge/stability-2%20--%20unstable-yellow.svg?style=flat-square
[stability-url]: https://nodejs.org/api/documentation.html#documentation_stability_index

Creates a temorary directory and then gives you the path to it.  `mkdirp`(`os.tmpdir` + `crypto.randomBytes`), tests, and possibly a few other conerns.

![demo](https://cdn.rawgit.com/bcomnes/node-tmpr/f871976d5f391b772573d36d1cbafe8fbe6cb4be/tmpr.gif)

# Install

```
$ npm i tmpr -g
```

## API

```js
var tmpr = require('tmpr')

tmpr(function(err, path) {
  console.log('Temp dir created at ' + path)
})
```

## References

- https://iojs.org/api/os.html#os_os_tmpdir
- https://iojs.org/api/crypto.html#crypto_crypto_randombytes_size_callback
- https://github.com/substack/node-mkdirp
- https://github.com/isaacs/rimraf

> [ogd] bret: require('os').tmpdir

> [ogd] i use that with require('mkdirp') and require('rimraf') a lot

> [ogd] bret: usually like ~~(Math.random() * 1000000) + Date.now()

> [ogd] could also do require('crypto').randomBytes(16).toString('hex')

> -- [#pdxnode](irc://chat.us.freenode.net/pdxnode) [2015-03-02 09:51:02]

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