Skip to content

Commit 298a40e

Browse files
committed
module: use "clean" objects
PR-URL: #10789 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent a851b86 commit 298a40e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/module.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ function Module(id, parent) {
6969
}
7070
module.exports = Module;
7171

72-
Module._cache = {};
73-
Module._pathCache = {};
74-
Module._extensions = {};
72+
Module._cache = Object.create(null);
73+
Module._pathCache = Object.create(null);
74+
Module._extensions = Object.create(null);
7575
var modulePaths = [];
7676
Module.globalPaths = [];
7777

0 commit comments

Comments
 (0)