> For the complete documentation index, see [llms.txt](https://tampered-console.js.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tampered-console.js.org/v2/formatting.md).

# Formatting

Percentage Escape Formatting

Tampered Console supports percentage escape formatting. Similar to [printf string formatting](https://en.wikipedia.org/wiki/Printf_format_string).

The following escapes are supported:

* `%s`: `String` will be used to convert all values except `BigInt`, `Object` and `-0`.&#x20;
* `%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:

```javascript
util.format('%s:%s', 'foo');
// Returns: 'foo:%s'
```

If there are more arguments passed than the number of specifiers, the extra arguments are concatenated to the returned string, separated by spaces:

```javascript
util.format('%s:%s', 'foo', 'bar', 'baz');
// Returns: 'foo:bar baz'
```

If only one argument is passed, it is returned as it is without any formatting:

```javascript
util.format('%% %s');
// Returns: '%% %s'
```
