File tree Expand file tree Collapse file tree 1 file changed +0
-36
lines changed
Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Original file line number Diff line number Diff line change 1- const isDebug = false ;
2-
31const { log :L } = console ;
4-
52const { warn :LW } = console ;
6-
73const { error :LE } = console ;
8-
9- const L_ = ( ...args ) => {
10- if ( isDebug ) {
11- const stack = new Error ( ) . stack ;
12- const caller = stack . split ( '\n' ) [ 2 ] . trim ( ) || '' ;
13- L ( `[DEBUG MSG ${ caller } ] ` , ...args ) ;
14- }
15- } ;
16-
17- const LF_ = ( ...args ) => {
18- if ( isDebug ) {
19- const stack = new Error ( ) . stack ;
20- const caller = stack || '' ;
21- LW ( `[DEBUG MSG ${ caller } ] ` , ...args ) ;
22- }
23- } ;
24-
25- const LE_ = ( ...args ) => {
26- if ( isDebug ) {
27- const stack = new Error ( ) . stack ;
28- const caller = stack . split ( '\n' ) [ 2 ] . trim ( ) || '' ;
29- LE ( `[DEBUG MSG ${ caller } ] ` , ...args ) ;
30- }
31- } ;
32-
33- const LW_ = ( ...args ) => {
34- if ( isDebug ) {
35- const stack = new Error ( ) . stack ;
36- const caller = stack . split ( '\n' ) [ 2 ] . trim ( ) || '' ;
37- LW ( `[DEBUG MSG ${ caller } ] ` , ...args ) ;
38- }
39- } ;
You can’t perform that action at this time.
0 commit comments