2023-02-03 19:21:19 +01:00
|
|
|
# COUT
|
|
|
|
|
|
|
|
This module allow you to make COUT and Debugs in NodeJS
|
|
|
|
|
2023-06-19 19:01:40 +02:00
|
|
|
## MJS or TypeScript
|
2023-02-03 19:21:19 +01:00
|
|
|
```js
|
2023-07-08 16:22:05 +02:00
|
|
|
import cc from 'node-cout';
|
2023-02-03 19:21:19 +01:00
|
|
|
|
2023-07-08 16:22:05 +02:00
|
|
|
const cout = new cc(0, true, true); // debugLevel, logs enabled (file), emojis enabled
|
2023-02-03 19:21:19 +01:00
|
|
|
|
2023-06-19 18:59:21 +02:00
|
|
|
cout.debug('test', 0) // console.log time and the string, if the number is >= to the debugLevel
|
|
|
|
cout.log('test')
|
|
|
|
cout.error('test')
|
|
|
|
cout.warn('test')
|
|
|
|
cout.info('test')
|
2023-06-19 19:01:40 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## CJS
|
|
|
|
use `await import("")`
|
|
|
|
```js
|
2023-07-08 16:22:05 +02:00
|
|
|
const { default } = await import('node-cout'); // ti put in an async function
|
|
|
|
const cout = new default(); // from here equal to MJS example
|
|
|
|
```
|
|
|
|
|
|
|
|
## Changelogs
|
2023-07-08 16:38:38 +02:00
|
|
|
### 2023.07.08-1
|
|
|
|
- Fix info Emoji
|
|
|
|
|
2023-07-08 16:22:05 +02:00
|
|
|
### v2023.07.08
|
|
|
|
- Exported the main class as default
|
|
|
|
- Add Stringify to all functions
|
|
|
|
- Changed the string type in the function to "any"
|