tmpr

Creates a temorary directory and gives you the path to it.

use temporary-directory instead
Last updated 6 years ago by bret .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install tmpr 
SYNC missed versions from official npm registry.

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 09:51:02]

Current Tags

  • 1.0.3                                ...           latest (6 years ago)

4 Versions

  • 1.0.3 [deprecated]           ...           6 years ago
  • 1.0.2 [deprecated]           ...           6 years ago
  • 1.0.1 [deprecated]           ...           6 years ago
  • 1.0.0 [deprecated]           ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |