File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ logger.subscribe(console.info);
24
24
// Add a new line
25
25
const log = logger .log ;
26
26
log (' Hello World!' );
27
- `
28
27
```
29
28
30
29
## Sharing loggers between independent libraries
@@ -39,11 +38,12 @@ const loggerB = createLogger();
39
38
console .log (loggerA === loggerB); // true
40
39
41
40
const loggerC = createLogger (' You can use different reference with key string' );
42
- console.log(loggerA === loggerC) // false
41
+ console .log (loggerA === loggerC); // false
43
42
44
43
// Yes, This is global injection :P
45
- console.log(loggerC === window['You can use different reference with key string']); // true
46
- `
44
+ console .log (
45
+ loggerC === window [' You can use different reference with key string' ]
46
+ ); // true
47
47
```
48
48
49
49
If you hate this way, you can use constructor. This way ** DO NOT** global injection.
You can’t perform that action at this time.
0 commit comments