Update README.md

This commit is contained in:
Killer Boss Original 2023-01-28 19:16:48 +01:00 committed by GitHub
parent 8718af4659
commit 60e0fb0b67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,8 @@
Work IN PROGRESS # STD
Standard module for NodeJS / TypeScript
Note: TypeScript support is in testing
```js ```js
const { cin } = require('@thundernetworkrad/std'); const { cin } = require('@thundernetworkrad/std');
@ -10,9 +14,21 @@ cin('Question').then((response) => {
```js ```js
const { createCout } = require('@thundernetworkrad/std'); 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; 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 }
``` ```