mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
lib: remove inherits() usage
This switches all `util.inherits()` calls to use `Object.setPrototypeOf()` instead. In fact, `util.inherits()` is mainly a small wrapper around exactly this function while adding the `_super` property on the object as well. Refs: #24395 PR-URL: https://github.com/nodejs/node/pull/24755 Refs: https://github.com/nodejs/node/issues/24395 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
1 parent
6ccc80c82a
commit
dcc82b37b6
26 files changed
+50
-72
No files matched your search
+1
-1
@@ -149,7 +149,7 @@ function Agent(options) {
|
||||
list: []
|
||||
};
|
||||
}
|
||||
inherits(Agent, HttpAgent);
|
||||
Object.setPrototypeOf(Agent.prototype, HttpAgent.prototype);
|
||||
Agent.prototype.createConnection = createConnection;
|
||||
|
||||
Agent.prototype.getName = function getName(options) {
|
||||
|
||||
Reference in new issue
Block a user