https://github.com/serapath/tempfile-stream
makes a temporary file to write to, which is deleted on process.exit
https://github.com/serapath/tempfile-stream
Last synced: about 1 year ago
JSON representation
makes a temporary file to write to, which is deleted on process.exit
- Host: GitHub
- URL: https://github.com/serapath/tempfile-stream
- Owner: serapath
- License: mit
- Created: 2017-01-17T16:14:34.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-17T16:35:31.000Z (over 9 years ago)
- Last Synced: 2025-03-19T12:07:31.292Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/tempfile-stream
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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())
})
```