Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gettemporaryfilepath

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gettemporaryfilepath - npm Package Compare versions

Comparing version 0.0.1 to 1.0.0

.npmignore

21

lib/getTemporaryFilePath.js

@@ -11,8 +11,7 @@ // Fragments of the seemingly abandoned https://github.com/bruce/node-temp/blob/master/lib/temp.js patched to use os.tmpDir() if available:

// Memoized because those fs.realpathSync calls are expensive:
var tempDir;
function getTempDir() {
if (!tempDir) {
if (os && os.tmpDir) {
tempDir = os.tmpDir();
// Memoized because those fs.realpathSync calls are expensive:
if (!getTempDir.tmpDir) {
if (os && os.tmpdir) {
getTempDir.tempDir = os.tmpdir();
} else {

@@ -23,11 +22,11 @@ var environmentVariableNames = ['TMPDIR', 'TMP', 'TEMP'];

if (environmentVariableValue) {
tempDir = fs.realpathSync(environmentVariableValue);
getTempDir.tempDir = fs.realpathSync(environmentVariableValue);
break;
}
}
if (!tempDir) {
if (!getTempDir.tempDir) {
if (process.platform === 'win32') {
tempDir = fs.realpathSync('c:\\tmp');
getTempDir.tempDir = fs.realpathSync('c:\\tmp');
} else {
tempDir = fs.realpathSync('/tmp');
getTempDir.tempDir = fs.realpathSync('/tmp');
}

@@ -37,3 +36,3 @@ }

}
return tempDir;
return getTempDir.tempDir;
}

@@ -76,1 +75,3 @@

module.exports = getTemporaryFilePath;
module.exports.getTempDir = getTempDir;
{
"name": "gettemporaryfilepath",
"version": "0.0.1",
"description": "Generate temporary file names in your OS' temporary dir",
"main": "lib/getTemporaryFilePath.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git://github.com/papandreou/node-gettemporaryfilepath.git"
},
"keywords": [
"temporary",
"tmp",
"temp",
"os",
"tempdir",
"windows",
"linux",
"osx"
],
"author": "Andreas Lind Petersen <andreas@one.com>",
"license": "BSD"
"name": "gettemporaryfilepath",
"version": "1.0.0",
"description": "Generate temporary file names in your OS' temporary dir",
"main": "lib/getTemporaryFilePath.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git://github.com/papandreou/node-gettemporaryfilepath.git"
},
"keywords": [
"temporary",
"tmp",
"temp",
"os",
"tempdir",
"windows",
"linux",
"osx"
],
"author": "Andreas Lind Petersen <andreas@one.com>",
"license": "BSD",
"devDependencies": {
"mocha": "=1.18.2",
"sinon": "=1.9.0",
"unexpected": "=3.0.1",
"unexpected-sinon": "=3.0.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc