From 24d31b16a3985c321c6898d558475ed65c9a6021 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Sat, 8 Jun 2024 16:22:05 +0200 Subject: [PATCH] small updates --- README.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8058013..97d8a83 100644 --- a/README.md +++ b/README.md @@ -225,17 +225,6 @@ Log types are exposed as `consola.[type](...)` and each is a preset of styles an A list of all available built-in types is [available here](./src/constants.ts). -## Raw output - -Objects sent to reporter by logging them could lead to unexcepted output when object is close to internal object structure ([see how consola consider object as non-conflictual](https://github.com/unjs/consola/blob/ce2b368f43813aa95e54d6124425b1c6badc087e/src/utils/log.ts#L5)). -To enforce the object to be interpreted, you can use the `raw` method chained to any log type. - -See [examples/raw.ts](./examples/raw.ts). - -> [!NOTE] -> As his usage is mostly for an advanced usage of consola and for debugging, the `raw` method could be change in future - - ## Creating a new instance Consola has a global instance and is recommended to use everywhere. @@ -313,6 +302,15 @@ import { const { stripAnsi } = require("consola/utils"); ``` +## Raw logging methods + +In rare conditions, Objects sent to the reporter could lead to unexpected output when object is close to internal object structure having both `message` and `args` props. To enforce the object to be interpreted as pure object, you can use the `raw` method chained to any log type. + +See [examples/raw.ts](./examples/raw.ts). + +> [!NOTE] +> As his usage is mostly for an advanced usage of consola and for debugging, the `raw` method could be change in future. + ## License MIT