Comparing version 6.6.1 to 6.6.2
@@ -36,9 +36,6 @@ "use strict"; | ||
function tmppath(ext, trash, len) { | ||
ext = ext || "tmp"; len = len || 8; | ||
if(trash === undefined) trash = true; | ||
function tmppath(ext = "tmp", trash = true, len = 8, basedir = os.tmpdir()) { | ||
var body = crypto.randomBytes(len).toString('base64').replace(/\//g, '+').substr(0, len); | ||
var fname = ext + "-" + body + "." + ext; | ||
var file_path = path.join(os.tmpdir(), fname); | ||
var file_path = path.join(basedir, fname); | ||
@@ -52,2 +49,3 @@ var fullpath = fs.existsSync(file_path) ? tmppath(ext, trash, len + 1) : file_path; | ||
module.exports = tmppath; |
{ | ||
"name": "nyks", | ||
"version": "6.6.1", | ||
"version": "6.6.2", | ||
"description": "nodejs exupery style", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
74608
2011