JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 52
  • Score
    100M100P100Q87910F
  • License MIT

Creates a temporary file, returns a write stream, a path, and cleanup functions.

Package Exports

  • create-temp-file2

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (create-temp-file2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

create-temp-file2

Last version Build Status Dependency status Dev Dependencies Status NPM Status Donate

Creates a temporary file, returns a write stream, a path, and cleanup functions.

Install

npm install create-temp-file2 --save

Usage

var createTempFile = require('create-temp-file2');
var temp = createTempFile({enoent: false}) // Prevent ENOENT error.

API

createTempFile({options})

options.enoent

Type: boolean Default: true

Prevent emit an error under ENOENT error. This error appear when you call .cleanup or .cleanupSync more than once.

The rest of the params provided will be passed to tempFile2.

.cleanup

Alias to fs.unlink handling errors as stream.

.cleanupSync

Sync version on .cleanup.

  • tempfile2 – Get a random temp file path. much better.

License

MIT © Kiko Beats