Skip to content

Commit 298a40e

Browse files
committed
module: use "clean" objects
PR-URL: #10789 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent a851b86 commit 298a40e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/module.js

Lines changed: 3 additions & 3 deletions
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)