Skip to content

Commit f07aacf

Browse files
committed
Rename constant to TMP_DIR
1 parent a7f493e commit f07aacf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/tmp.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const
5454
* The temporary directory.
5555
* @type {string}
5656
*/
57-
tmpDir = osTmpDir(),
57+
TMP_DIR = osTmpDir(),
5858

5959
// the random characters to choose from
6060
RANDOM_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
@@ -122,7 +122,7 @@ function _isUndefined(obj: any) {
122122
*/
123123
function _generateTmpName(opts: Options) {
124124
if (opts.name) {
125-
return path.join(opts.dir || tmpDir, opts.name);
125+
return path.join(opts.dir || TMP_DIR, opts.name);
126126
}
127127

128128
// mkstemps like template
@@ -138,7 +138,7 @@ function _generateTmpName(opts: Options) {
138138
opts.postfix || ''
139139
].join('');
140140

141-
return path.join(opts.dir || tmpDir, name);
141+
return path.join(opts.dir || TMP_DIR, name);
142142
}
143143

144144
/**
@@ -626,7 +626,7 @@ process.addListener('exit', function _exit(code) {
626626
*/
627627

628628
// exporting all the needed methods
629-
module.exports.tmpdir = tmpDir;
629+
module.exports.tmpdir = TMP_DIR;
630630

631631
module.exports.dir = dir;
632632
module.exports.dirSync = dirSync;

0 commit comments

Comments
 (0)