From 791caa88fde37bfae7fb9a57a86256fc595a11a9 Mon Sep 17 00:00:00 2001 From: Isra Date: Sun, 1 Oct 2023 15:18:14 -0500 Subject: [PATCH] refactor: use util.inspect instead of a stringify --- src/dev-cli.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dev-cli.ts b/src/dev-cli.ts index b2161b3..fc8f2f3 100644 --- a/src/dev-cli.ts +++ b/src/dev-cli.ts @@ -1,3 +1,5 @@ +import util from 'node:util'; + // eslint-disable-next-line import/no-extraneous-dependencies import { program } from 'commander'; // eslint-disable-next-line import/no-extraneous-dependencies @@ -47,6 +49,10 @@ if (!TMDB_API_KEY?.trim()) { throw new Error('Missing MOVIE_WEB_TMDB_API_KEY environment variable'); } +function showOutput(object: object) { + console.log(util.inspect(object, { showHidden: false, depth: null, colors: true })); +} + function getAllSources() { // * The only way to get a list of all sources is to // * create all these things. Maybe this should change