forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
util: change %d to format a integer, add %i and %f
This change brings formatting specifiers available in `util.format` and consequently, `console.*` closer to what is supported in all major browsers. There is a breaking change with the `%d` specifier which previously served a double purpose of formatting both integer and floats. With this change, it will format only as integer. - `%d` is being changed to format only as integer. - `%i` is introduced as an alias to `%d`. - `%f` is introduced to format floating point values. When updating code, all instances of `%d` format strings that were supplied with floats should be changed to the `%f` format string. Fixes: nodejs#10292
- Loading branch information
1 parent
ed12ea3
commit 04143cf
Showing
3 changed files
with
47 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters