Skip to content

resonance-cascade/node-tmpr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tmpr

DEPRECIATED: USE https://github.com/maxogden/temporary-directory instead

release npm travis coverage david stability

Creates a temorary directory and then gives you the path to it. mkdirp(os.tmpdir + crypto.randomBytes), tests, and possibly a few other conerns.

demo

Install

$ npm i tmpr -g

API

var tmpr = require('tmpr')

tmpr(function(err, path) {
  console.log('Temp dir created at ' + path)
})

References

[ogd] bret: require('os').tmpdir

[ogd] i use that with require('mkdirp') and require('rimraf') a lot

[ogd] bret: usually like ~~(Math.random() * 1000000) + Date.now()

[ogd] could also do require('crypto').randomBytes(16).toString('hex')

-- #pdxnode [2015-03-02 09:51:02]