temp-dir
Advanced tools
Comparing version 1.0.0 to 2.0.0
@@ -5,6 +5,6 @@ 'use strict'; | ||
const ID = '__RESOLVED_TMP_DIR__'; | ||
const tempDirectorySymbol = Symbol.for('__RESOLVED_TEMP_DIRECTORY__'); | ||
if (!global[ID]) { | ||
Object.defineProperty(global, ID, { | ||
if (!global[tempDirectorySymbol]) { | ||
Object.defineProperty(global, tempDirectorySymbol, { | ||
value: fs.realpathSync(os.tmpdir()) | ||
@@ -14,2 +14,2 @@ }); | ||
module.exports = global[ID]; | ||
module.exports = global[tempDirectorySymbol]; |
{ | ||
"name": "temp-dir", | ||
"version": "1.0.0", | ||
"description": "Get the real path of the system temp directory", | ||
"license": "MIT", | ||
"repository": "sindresorhus/temp-dir", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"temp", | ||
"tmp", | ||
"dir", | ||
"tmpdir", | ||
"os", | ||
"system", | ||
"real", | ||
"path", | ||
"realpath", | ||
"resolved" | ||
], | ||
"devDependencies": { | ||
"ava": "*", | ||
"proxyquire": "^1.7.11", | ||
"xo": "*" | ||
} | ||
"name": "temp-dir", | ||
"version": "2.0.0", | ||
"description": "Get the real path of the system temp directory", | ||
"license": "MIT", | ||
"repository": "sindresorhus/temp-dir", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=8" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava && tsd" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
"keywords": [ | ||
"temp", | ||
"tmpdir", | ||
"os", | ||
"system", | ||
"real", | ||
"path", | ||
"realpath", | ||
"resolved", | ||
"temporary", | ||
"directory", | ||
"folder" | ||
], | ||
"devDependencies": { | ||
"ava": "^1.4.1", | ||
"proxyquire": "^2.1.0", | ||
"tsd": "^0.7.2", | ||
"xo": "^0.24.0" | ||
} | ||
} |
@@ -11,3 +11,3 @@ # temp-dir [![Build Status](https://travis-ci.org/sindresorhus/temp-dir.svg?branch=master)](https://travis-ci.org/sindresorhus/temp-dir) | ||
``` | ||
$ npm install --save temp-dir | ||
$ npm install temp-dir | ||
``` | ||
@@ -19,5 +19,5 @@ | ||
```js | ||
const tempDir = require('temp-dir'); | ||
const tempDirectory = require('temp-dir'); | ||
console.log(tempDir); | ||
console.log(tempDirectory); | ||
//=> '/private/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T' | ||
@@ -24,0 +24,0 @@ |
Sorry, the diff of this file is not supported yet
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3285
5
24
0
4