From 60e0fb0b67c89b8f7514da0bd7d1e5f2b266f5b7 Mon Sep 17 00:00:00 2001 From: Killer Boss Original <73131550+killerbossoriginal@users.noreply.github.com> Date: Sat, 28 Jan 2023 19:16:48 +0100 Subject: [PATCH] Update README.md --- README.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0699946..1277e04 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ -Work IN PROGRESS +# STD + +Standard module for NodeJS / TypeScript + +Note: TypeScript support is in testing ```js const { cin } = require('@thundernetworkrad/std'); @@ -10,9 +14,21 @@ cin('Question').then((response) => { ```js const { createCout } = require('@thundernetworkrad/std'); -let ccout = new createCout(0, true); // debugLevel, logs enabled (file) +let ccout = new createCout(0, true); // debugLevel, logs enabled (file) (like using log() ) let cout = ccout.cout; -cout('test', 0) // console.log day and time, if the number is >= to the debugLevel +cout('test', 0) // console.log day, time and the string, if the number is >= to the debugLevel +``` + +```js +const { log } = require('@thundernetworkrad/std'); + +log('test') // create a file at the first log, add the string to the log +``` + +```js +const { getTime } = require('@thundernetworkrad/std'); + +let time = getTime() // return { year, month, day, hours, minutes, seconds } ```