# tempfile-stream

> creates a temporary file, that has a filename, can be written to and read from and is deleted on process.exit

Latest version **1.0.0** (published 2017-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install tempfile-stream
pnpm add tempfile-stream
yarn add tempfile-stream
bun add tempfile-stream
```

## 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 | 2017-01-17 |
| First published | 2017-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | @serapath |
| Maintainers | serapath |
| Keywords | temp, temporary, file, stream |

## Links

- npm: https://www.npmjs.com/package/tempfile-stream
- Repository: https://github.com/serapath/tempfile-stream
- Homepage: https://github.com/serapath/tempfile-stream#readme
- Issues: https://github.com/serapath/tempfile-stream/issues
- npm.io page: https://npm.io/package/tempfile-stream

## 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.0 (latest) — 2017-01-17

## README

# tempfile-stream
makes a temporary file to write to, which is deleted on process.exit

# usage

```js
var tempfile = require('tempfile-stream')

var file$ = tempfile('.js') // specify extension if needed

var filename = file$.path()

file$.write('console.log("foobar")')

// test
var fs = require('fs')
console.log(filename)
fs.readFile(filename, function (error, filecontent) {
  if (error) throw error
  console.log(filecontent.toString())
})
```

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