Formatting
Percentage Escape Formatting
Last updated
Was this helpful?
Percentage Escape Formatting
Last updated
Was this helpful?
Tampered Console supports percentage escape formatting. Similar to .
The following escapes are supported:
%s
: String
will be used to convert all values except BigInt
, Object
and -0
.
%d
: Number
will be used to convert all values except BigInt
and Symbol
.
%i
: parseInt(value, 10)
is used for all values except BigInt
and Symbol
.
%f
: parseFloat(value)
is used for all values expect Symbol
.
%j
: JSON. Replaced with the string '[Circular]'
if the argument contains circular references.
%o
: Object
. A string representation of an object with generic JavaScript object formatting. Similar to util.inspect()
with options { showHidden: true, showProxy: true }
. This will show the full object including non-enumerable properties and proxies.
%O
: Object
. A string representation of an object with generic JavaScript object formatting. Similar to util.inspect()
without options. This will show the full object not including non-enumerable properties and proxies.
%c
: CSS
. This specifier is ignored and will skip any CSS passed in.
%%
: single percent sign ('%'
). This does not consume an argument.
If a specifier does not have a corresponding argument, the escape is never replaced:
If there are more arguments passed than the number of specifiers, the extra arguments are concatenated to the returned string, separated by spaces:
If only one argument is passed, it is returned as it is without any formatting: