From 943992df098ea5df8db8a751e4cb568e93eb9ffc Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Tue, 18 Apr 2023 14:59:40 +0200 Subject: [PATCH] chore: add json example --- examples/json.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 examples/json.ts diff --git a/examples/json.ts b/examples/json.ts new file mode 100644 index 00000000..9da08483 --- /dev/null +++ b/examples/json.ts @@ -0,0 +1,13 @@ +import { createConsola } from "consola"; + +const consola = createConsola({ + reporters: [ + { + log: (logObj) => { + console.log(JSON.stringify(logObj)); + }, + }, + ], +}); + +consola.log("foo bar");