summaryrefslogtreecommitdiff
path: root/lib/module.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/module.js')
-rw-r--r--lib/module.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/module.js b/lib/module.js
index 0a4195cf7b..07c32b7eee 100644
--- a/lib/module.js
+++ b/lib/module.js
@@ -1,11 +1,11 @@
'use strict';
-var NativeModule = require('native_module');
-var util = NativeModule.require('util');
-var runInThisContext = require('vm').runInThisContext;
-var runInNewContext = require('vm').runInNewContext;
-var assert = require('assert').ok;
-var fs = NativeModule.require('fs');
+const NativeModule = require('native_module');
+const util = NativeModule.require('util');
+const runInThisContext = require('vm').runInThisContext;
+const runInNewContext = require('vm').runInNewContext;
+const assert = require('assert').ok;
+const fs = NativeModule.require('fs');
// If obj.hasOwnProperty has been overridden, then calling
@@ -42,13 +42,13 @@ Module.globalPaths = [];
Module.wrapper = NativeModule.wrapper;
Module.wrap = NativeModule.wrap;
-var path = NativeModule.require('path');
+const path = NativeModule.require('path');
Module._debug = util.debuglog('module');
// We use this alias for the preprocessor that filters it out
-var debug = Module._debug;
+const debug = Module._debug;
// given a module name, and a list of paths to test, returns the first
@@ -70,7 +70,7 @@ function statPath(path) {
}
// check if the directory is a package.json dir
-var packageMainCache = {};
+const packageMainCache = {};
function readPackage(requestPath) {
if (hasOwnProperty(packageMainCache, requestPath)) {
@@ -490,7 +490,7 @@ Module.runMain = function() {
};
Module._initPaths = function() {
- var isWindows = process.platform === 'win32';
+ const isWindows = process.platform === 'win32';
if (isWindows) {
var homeDir = process.env.USERPROFILE;