Skip to content

Commit 307ce02

Browse files
committed
2.0.0
1 parent 957974f commit 307ce02

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ npm install node-color-log@latest --save
3030
Put the following code in your `js` in which you want to log.
3131

3232
```javascript
33-
const Logger = require('node-color-log');
34-
const logger = new Logger();
33+
const logger = require('node-color-log');
3534
```
3635

3736
### Some parameters:

change.log.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2.0.0
2+
- `module.exports` from class type to function.
3+
14
1.1.1
25
- add new demo image
36

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,5 @@ class Logger {
193193
}
194194
}
195195

196-
module.exports = Logger;
196+
const logger = new Logger();
197+
module.exports = logger;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-color-log",
3-
"version": "1.1.1",
3+
"version": "2.0.0",
44
"description": "More powerful logger for NodeJs",
55
"main": "index.js",
66
"scripts": {

test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
const Logger = require('./index');
2-
const logger = new Logger();
3-
1+
const logger = require('./index');
42

53
logger.log('****************');
64
logger.log('*** Test log ***');

0 commit comments

Comments
 (0)