index.js 225 B

123456789
  1. 'use strict';
  2. var path = require('path');
  3. var os = require('os');
  4. var tmpdir = (os.tmpdir || os.tmpDir)();
  5. var uuid = require('uuid');
  6. module.exports = function (ext) {
  7. return path.join(tmpdir, uuid.v4() + (ext || ''));
  8. };