# self-destruct

> A module for self-destructable files

Latest version **1.0.0** (published 2015-10-21) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install self-destruct
pnpm add self-destruct
yarn add self-destruct
bun add self-destruct
```

## 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 | 2015-10-21 |
| First published | 2015-10-21 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Matthew Phillips |
| Maintainers | matthewp |
| Keywords | file, io |

## Links

- npm: https://www.npmjs.com/package/self-destruct
- Repository: https://github.com/matthewp/self-destruct
- Issues: https://github.com/matthewp/self-destruct/issues
- npm.io page: https://npm.io/package/self-destruct

## Dependencies (2)

- [pdenodeify](https://npm.io/package/pdenodeify.md) ^0.1.0
- [es6-promise](https://npm.io/package/es6-promise.md) ^3.0.2

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-10-21

## README

# self-destruct

A module for creating self destructing files.

## Install

```shell
npm install self-destruct --save
```

## Usage

```js
var selfDestruct = require("self-destruct");

selfDestruct(__dirname + "/foo.json", '{"foo":"bar"}', "utf8")
  .then(function(destroy){
    // Do some stuff now that foo.json exists.

    // And later destroy it.
    return destroy();
  });
```

## License

BSD 2 Clause

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