zeed icon indicating copy to clipboard operation
zeed copied to clipboard

Support formatting specifiers

Open holtwick opened this issue 4 years ago • 0 comments

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 avatar Jul 07 '21 12:07 holtwick