zeed
zeed copied to clipboard
Support formatting specifiers
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 |