JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1062
  • Score
    100M100P100Q103361F
  • License VOL

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

Package Exports

  • create-temp-file

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-file) 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-file

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

#example

var createTempFile = require('create-temp-file')

var tempFile = createTempFile()
process.stdin
    .pipe(tempFile.writeStream)
    .on('finish', function () {
        tempFile.cleanup()
    })

#usage

###createTempFile()

Returns a write stream to the new temp file with the following properties:

  • path is the path the the file on the hard drive
  • cleanup(cb) is a function that will delete the temp file. cb is the optional callback, and defaults to a no-op.
  • cleanupSync() is a function that deletes the temp file synchronously.

#license

VOL