-
-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Sync features with Node 9 #24
base: master
Are you sure you want to change the base?
Conversation
The new |
Think I'll split this up so we can get promisify out the door first :P not that many people really need the new format features, probably! |
How could I help get at least the |
What's the status here? |
Ping @goto-bus-stop |
promisify/callbackify was landed separately, debuglog is in another PR. Maybe we can extract the I can't commit enough time to finish |
@@ -113,6 +208,7 @@ exports.debuglog = function(set) { | |||
return debugs[set]; | |||
}; | |||
|
|||
var customInspectSymbol = typeof Symbol !== 'undefined' ? Symbol('util.inspect.custom') : undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Node 10.12 and newer registers the util.inspect.custom
symbol as nodejs.util.inspect.custom
, making it possible to use Symbol.for('nodejs.util.inspect.custom')
to get the equivalent util.inspect.custom
symbol without depending on util
:
var customInspectSymbol = typeof Symbol !== 'undefined' ? Symbol('util.inspect.custom') : undefined; | |
var customInspectSymbol = typeof Symbol !== 'undefined' && typeof Symbol.for !== 'undefined' ? Symbol.for('nodejs.util.inspect.custom') : undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Browsers, however, don’t register it, so I’d you don’t have util.inspect, there’s no point in having the symbol - why not just depend on util?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, node 6.6-10.11 all require this code, and can’t rely on the shared symbol.
Still need to port: