-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
util: spec of %d specifier #22885
Comments
Also, in node, by using It is a contradictory behavior imo. |
/ping @silverwind |
I'd rather keep the minor difference (which the Node.js ecosystem is probably used to) rather than loose functionality. |
I think we should take the breaking change and be spec-conformant. Formatting specifiers should be a rarely used feature and I guess most people would use template strings nowadays to interpolate data in strings. Any opinions from @nodejs/tsc? |
as long as our console claims to be the whatwg console we should make sure it follows spec. +1 from me |
Hi 👋 Thank you for your commens. |
PR is blocked and discussion seems to have run its course. Choices at this point are to close (and optionally pursue a spec change) or escalate to TSC. Thoughts? /ping @shisama |
@Trott Sorry for my late reply. I closed the PR. Also, I close this. Thank you. |
Due to a comment from whatwg/console#148 (comment) , does
%d
specifier have better useparseInt
? On Node.js,Number
constructor is used for%d
. Soconsole.log('%d', false)
prints0
on Node.js but it prints 'NaN` on Google Chrome.Is it okay if the specification is different from whatwg?
Code: https://github.com/nodejs/node/blob/master/lib/util.js#L294
whatwg spec: https://console.spec.whatwg.org/#formatting-specifiers
The text was updated successfully, but these errors were encountered: