From d3bf548a7a68b035d5386bc7d60868b1003f881e Mon Sep 17 00:00:00 2001 From: Killer Boss Original <73131550+killerbossoriginal@users.noreply.github.com> Date: Tue, 24 Jan 2023 17:16:59 +0100 Subject: [PATCH] Update index.js --- index.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 2d9ce46..7946b26 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ const { writeFile, readFile, mkdir } = require('node:fs/promises'); const { stdin, stdout } = require('node:process'); var readlineSync = require('readline-sync'); -var name; +var name, debug, logs1; function getTime () { const date_time = new Date(); @@ -47,17 +47,19 @@ function cin (question, hide) { class createCout { constructor (debugLevel, logs) { - this.debug = debugLevel; - this.logs = logs; + debug = debugLevel; + logs1 = logs; + console.log(debug, logs1) } cout (string, debugLevel) { + console.log(debug, logs1) if (!debugLevel) debugLevel = 0; var time = getTime(); - if (this.debug >= debugLevel) { + if (debug >= debugLevel) { console.log(`[${time.year}.${time.month}.${time.day}-${time.hours}:${time.minutes}:${time.seconds}] | ${String(string)}`); - if (this.logs) { + if (logs1) { log(string); } }