npm.io
1.0.3 • Published 11 years ago

tmpr

Licence
ISC
Version
1.0.3
Deps
1
Vulns
0
Weekly
0
Stars
2
DeprecatedThis package is deprecated

tmpr

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 0902]

Keywords