
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
create-temp-file
Advanced tools
Creates a temporary file, returns a write stream, a path, and cleanup functions
A tiny node module that creates a temporary file, returns a write stream, a path, and cleanup functions
var createTempFile = require('create-temp-file')
var ws = createTempFile()
process.stdin.pipe(ws)
process.on('exit', ws.cleanupSync)
var createTempFile = require('create-temp-file')
var ws = createTempFile([extension])
You can set the file extension
for the temp file, or don't set an extension. E.g. '.png'
.
ws
is a write stream to the new temporary file with the following properties:
ws.path
is the absolute path to the temporary file. E.g. '/tmp/b285e724-226c-11e5-9981-82bd40254040.png'
ws.cleanup([cb])
deletes the temporary file. Like fs.unlink
ws.cleanupSync
deletes the temporary file synchronously. Like fs.unlinkSync
If an error occurs in ws.cleanup()
or ws.cleanupSync()
, the error will be emitted. Catch any errors like this:
ws.on('error', function (e) {
throw e
})
With npm do:
npm install create-temp-file
FAQs
Creates a temporary file, returns a write stream, a path, and cleanup functions
The npm package create-temp-file receives a total of 662 weekly downloads. As such, create-temp-file popularity was classified as not popular.
We found that create-temp-file demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.