Skip to content

Commit

Permalink
docs: add banner to README file
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Sep 5, 2024
1 parent aad7b0c commit 332be96
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Dumper is similar to Node.js [util.inspect](https://nodejs.org/api/util.html#utilinspectobject-options) but it provides more control over the output. You can use Dumper to generate [HTML output](#html-formatter), [CLI output](#cli-formatter), or use its [low-level API](#using-parser-directly) to create inspection tokens and render them using a custom formatter.

![](./dumper-example.png)

> [!IMPORTANT]
> Dumper is a low-level utility and you may have to write a wrapper around it for the framework of your choice.
Expand Down Expand Up @@ -129,7 +131,7 @@ console.log(ansiOutput)

You may pass all of the [Parser options](#parser-options) alongside the following options as the second argument to the `dump` method.

- `styles`: The styles property contains a set of functions for different tokens. Each function receives a string input and must return a styled output string.
- `styles`: The styles property contains a set of functions for different tokens. Each function receives a string input and must return a styled output string.

Following is an example of using a pre-existing theme.

Expand Down Expand Up @@ -288,4 +290,4 @@ const tokens = parser.flush()
const output = tokens.map((token) => {
return myCustomPrinters[token.type](token)
}).join('')
```
```
Binary file added dumper-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 332be96

Please sign in to comment.