aboutsummaryrefslogtreecommitdiff
path: root/lib/fs.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fs.js')
-rw-r--r--lib/fs.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/fs.js b/lib/fs.js
index 3d65b2efa0..2c2cfae5a5 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -43,7 +43,6 @@ const internalUtil = require('internal/util');
const assertEncoding = internalFS.assertEncoding;
const stringToFlags = internalFS.stringToFlags;
const getPathFromURL = internalURL.getPathFromURL;
-const { StorageObject } = require('internal/querystring');
Object.defineProperty(exports, 'constants', {
configurable: false,
@@ -1560,7 +1559,7 @@ if (isWindows) {
nextPart = function nextPart(p, i) { return p.indexOf('/', i); };
}
-const emptyObj = new StorageObject();
+const emptyObj = Object.create(null);
fs.realpathSync = function realpathSync(p, options) {
if (!options)
options = emptyObj;
@@ -1580,8 +1579,8 @@ fs.realpathSync = function realpathSync(p, options) {
return maybeCachedResult;
}
- const seenLinks = new StorageObject();
- const knownHard = new StorageObject();
+ const seenLinks = Object.create(null);
+ const knownHard = Object.create(null);
const original = p;
// current character position in p
@@ -1700,8 +1699,8 @@ fs.realpath = function realpath(p, options, callback) {
return;
p = pathModule.resolve(p);
- const seenLinks = new StorageObject();
- const knownHard = new StorageObject();
+ const seenLinks = Object.create(null);
+ const knownHard = Object.create(null);
// current character position in p
var pos;