Skip to content

Commit aa24059

Browse files
committed
Document custom option
1 parent 18f80c7 commit aa24059

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

β€ŽREADME.mdβ€Ž

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ Error handler for CLI applications.
1414
# Features
1515

1616
- πŸ–οΈ Pretty [colors](#%EF%B8%8F-colors), [icons](#-icon) and [header](#-header)
17-
- πŸ’£ [Error class-specific](#-classes) and [custom](#custom-serialization)
18-
handling
17+
- πŸ’£ [Error class-specific](#-classes) and [custom](#-custom) handling
1918
- πŸš’ [Graceful exit](#-timeout)
2019
- ⛑️ [Normalize](https://github.com/ehmicky/normalize-exception) invalid errors
2120
- πŸ”• Log verbosity: [message](#-silent), [stack](#-stack),
@@ -194,10 +193,13 @@ Specify [different options per error class](#error-class-specific). The object:
194193
or `"default"` (used if no `error.name` matches)
195194
- Values are [options](#options) objects
196195

197-
## Custom serialization
196+
#### πŸͺ› custom
198197

199-
The output can be transformed/mapped by defining an `error.beautiful(output)`
200-
method returning a string.
198+
_Type_: `string | symbol`\
199+
_Default_: `beautiful`
200+
201+
Name of a method to map the output. That method must take the output as a string
202+
argument, transform it then return it.
201203

202204
<!-- eslint-disable fp/no-class -->
203205

0 commit comments

Comments
Β (0)