Skip to content

Commit 2f47b8d

Browse files
committed
Rename constant to follow naming conventions
1 parent 1ff23d1 commit 2f47b8d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/tmp.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const
8181
NODE_VERSION = process.versions.node.split('.').map((value) => parseInt(value, 10)),
8282

8383
// this will hold the objects need to be removed on exit
84-
_removeObjects: CleanupCallback[] = [];
84+
REMOVE_OBJECTS: CleanupCallback[] = [];
8585

8686
var
8787
_gracefulCleanup = false,
@@ -429,7 +429,7 @@ function _prepareTmpFileRemoveCallback(name: string, fd: number, opts: FileOptio
429429
}, [fd, name]);
430430

431431
if (!opts.keep) {
432-
_removeObjects.unshift(removeCallback);
432+
REMOVE_OBJECTS.unshift(removeCallback);
433433
}
434434

435435
return removeCallback;
@@ -448,7 +448,7 @@ function _prepareTmpDirRemoveCallback(path: string, opts: DirOptions): CleanupCa
448448
const removeCallback = _prepareRemoveCallback(removeFunction, path);
449449

450450
if (!opts.keep) {
451-
_removeObjects.unshift(removeCallback);
451+
REMOVE_OBJECTS.unshift(removeCallback);
452452
}
453453

454454
return removeCallback;
@@ -467,9 +467,9 @@ function _prepareRemoveCallback<T>(removeFunction: (_: T) => void, arg: T): Clea
467467

468468
return function _cleanupCallback(next) {
469469
if (!called) {
470-
const index = _removeObjects.indexOf(_cleanupCallback);
470+
const index = REMOVE_OBJECTS.indexOf(_cleanupCallback);
471471
if (index >= 0) {
472-
_removeObjects.splice(index, 1);
472+
REMOVE_OBJECTS.splice(index, 1);
473473
}
474474

475475
called = true;
@@ -492,9 +492,9 @@ function _garbageCollector(): void {
492492

493493
// the function being called removes itself from _removeObjects,
494494
// loop until _removeObjects is empty
495-
while (_removeObjects.length) {
495+
while (REMOVE_OBJECTS.length) {
496496
try {
497-
_removeObjects[0].call(null);
497+
REMOVE_OBJECTS[0].call(null);
498498
} catch (e) {
499499
// already removed?
500500
}

0 commit comments

Comments
 (0)