# tmpz

> Copy a file or directory to OS temporary directory with a random name. Also you can remove it later.

Latest version **1.0.1** (published 2017-04-06) · MIT license · 0 weekly downloads

## Install

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

## 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.1 |
| Published | 2017-04-06 |
| First published | 2017-02-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jose Luis Quintana |
| Maintainers | joseluisq |
| Keywords | copy, remove, random, temporary, temp, directory, file |

## Links

- npm: https://www.npmjs.com/package/tmpz
- Repository: https://github.com/joseluisq/tmpz
- Homepage: https://github.com/joseluisq/tmpz#readme
- Issues: https://github.com/joseluisq/tmpz/issues
- npm.io page: https://npm.io/package/tmpz

## Dependencies (1)

- [fs-extra](https://npm.io/package/fs-extra.md) ^2.1.2

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-04-06
- 1.0.0 — 2017-02-03

## README

# Tmpz [![Build Status](https://travis-ci.org/joseluisq/tmpz.svg?branch=master)](https://travis-ci.org/joseluisq/tmpz) [![Coverage Status](https://coveralls.io/repos/github/joseluisq/tmpz/badge.svg?branch=master)](https://coveralls.io/github/joseluisq/tmpz?branch=master) [![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) [![Greenkeeper badge](https://badges.greenkeeper.io/joseluisq/tmpz.svg)](https://greenkeeper.io/)

> Copy a file or directory to OS temporary directory with a random name. Also you can remove it later.

## Prerequisites

[NodeJS](https://nodejs.org) v4.0 or greater.

## Install

```sh
npm install tmpz --save-dev
```

## Usage

```js
const tmpz = require('tmpz')

try {
  const dest = tmpz.copy('./my_directory')
  console.log(dest)
  // > /tmp/393a6d0851bb6c10214f92bbaa9c833d

  // Removing the temp dir in 7 seconds
  setTimeout(() => tmpz.remove(dest), 7000)
} catch (err) {
  console.error(err)
}
```

## License
MIT license

© 2017 [José Luis Quintana](http://quintana.io)

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