-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.
Description
A few patterns (modulo destructuring):
- Replace
require('util').inherits()
usages underlib
: Remove util.inherits usage internally? #24395
// Change this
util.inherits(A, B);
// To this
Object.setPrototypeOf(A.prototype, B.prototype);
Object.setPrototypeOf(A, B);
- Replace
require('util').inspect
withrequire('internal/util/inspect').inspect
- Replace
require('util').format
withrequire('internal/util/inspect').format
- Replace
require('util').debuglog
withrequire('internal/util/debuglog').debuglog
- Replace
require('util').types
withrequire('internal/util/types')
- Replace
require('util').deprecate
withrequire('internal/util').deprecate
- Replace
require('util').promisify
withrequire('internal/util').promisify
List of JS files that can be refactored:
micheleriva, starkwang, ZYSzys, Naturalclar and shisama
Metadata
Metadata
Assignees
Labels
good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.