diff options
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/os-tmpdir/index.js')
-rw-r--r-- | sandbox/testAppNevena/Front/node_modules/os-tmpdir/index.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/os-tmpdir/index.js b/sandbox/testAppNevena/Front/node_modules/os-tmpdir/index.js new file mode 100644 index 00000000..2077b1ce --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/os-tmpdir/index.js @@ -0,0 +1,25 @@ +'use strict'; +var isWindows = process.platform === 'win32'; +var trailingSlashRe = isWindows ? /[^:]\\$/ : /.\/$/; + +// https://github.com/nodejs/node/blob/3e7a14381497a3b73dda68d05b5130563cdab420/lib/os.js#L25-L43 +module.exports = function () { + var path; + + if (isWindows) { + path = process.env.TEMP || + process.env.TMP || + (process.env.SystemRoot || process.env.windir) + '\\temp'; + } else { + path = process.env.TMPDIR || + process.env.TMP || + process.env.TEMP || + '/tmp'; + } + + if (trailingSlashRe.test(path)) { + path = path.slice(0, -1); + } + + return path; +}; |