-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Labels
questionIssues that look for answers.Issues that look for answers.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.
Description
const util = require('util')
const a = { b: 1 }
const p = new Proxy(a, { get: (target, prop, receiver) => {
if(prop === util.inspect.custom) {
return () => 'Hello world'
}
return target[prop]
}})
console.log(p)Code above will output Hello world in node 10.x
It will output { b: 1 } in node 13.x
I am not sure this is by design a breaking change or a bug.
Metadata
Metadata
Assignees
Labels
questionIssues that look for answers.Issues that look for answers.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.