Skip to content
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

Support formatting specifiers #1

Open
holtwick opened this issue Jul 7, 2021 · 0 comments
Open

Support formatting specifiers #1

holtwick opened this issue Jul 7, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request logging

Comments

@holtwick
Copy link
Owner

holtwick commented Jul 7, 2021

https://console.spec.whatwg.org/#formatting-specifiers

Consider log(fmt("Test %o", obj)) to make it work with console hack.

Specifier Purpose Type Conversion
%s Element which substitutes is converted to a string %String%(element)
%d or %i Element which substitutes is converted to an integer %parseInt%(element, 10)
%f Element which substitutes is converted to a float %parseFloat%(element, 10)
%o Element is displayed with optimally useful formatting n/a
%O Element is displayed with generic JavaScript object formatting n/a
%c Applies provided CSS n/a

@holtwick holtwick self-assigned this Jul 8, 2021
@holtwick holtwick added enhancement New feature or request logging labels Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request logging
Projects
None yet
Development

No branches or pull requests

1 participant