Get a random temp file path
JavaScript
Latest commit f93c8f9 Feb 18, 2016 @sindresorhus update for latest AVA
Permalink
Failed to load latest commit information.
.editorconfig tweaks Oct 5, 2015
.gitattributes init Dec 31, 2013
.gitignore init Dec 31, 2013
.travis.yml tweaks Oct 5, 2015
index.js use the `os-tmpdir` module for a consistent output between Node.js ve… May 7, 2015
license tweaks Aug 13, 2014
package.json add XO Oct 5, 2015
readme.md tweaks Oct 5, 2015
test.js update for latest AVA Feb 18, 2016

readme.md

tempfile Build Status

Get a random temp file path

Install

$ npm install --save tempfile

Usage

const tempfile = require('tempfile');

tempfile('.png');
//=> '/var/folders/_1/tk89k8215ts0rg0kmb096nj80000gn/T/4049f192-43e7-43b2-98d9-094e6760861b.png'

API

tempfile([extension])

extension

Type: string

Extension to append to the path.

Related

  • temp-write - Write string/buffer to a random temp file

License

MIT © Sindre Sorhus