aboutsummaryrefslogtreecommitdiff
path: root/lib/internal/fs/watchers.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/fs/watchers.js')
-rw-r--r--lib/internal/fs/watchers.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/internal/fs/watchers.js b/lib/internal/fs/watchers.js
index e026aa8192..46a520a45c 100644
--- a/lib/internal/fs/watchers.js
+++ b/lib/internal/fs/watchers.js
@@ -19,7 +19,6 @@ const {
const { toNamespacedPath } = require('path');
const { validateUint32 } = require('internal/validators');
const { toPathIfFileURL } = require('internal/url');
-const util = require('util');
const assert = require('assert');
const kOldStatus = Symbol('kOldStatus');
@@ -36,7 +35,7 @@ function StatWatcher(bigint) {
this[kOldStatus] = -1;
this[kUseBigint] = bigint;
}
-util.inherits(StatWatcher, EventEmitter);
+Object.setPrototypeOf(StatWatcher.prototype, EventEmitter.prototype);
function onchange(newStatus, stats) {
const self = this[owner_symbol];
@@ -132,7 +131,7 @@ function FSWatcher() {
}
};
}
-util.inherits(FSWatcher, EventEmitter);
+Object.setPrototypeOf(FSWatcher.prototype, EventEmitter.prototype);
// FIXME(joyeecheung): this method is not documented.