@@ -215,13 +215,13 @@ <h4>Examples</h4>
215
215
< span class ="hljs-built_in "> console</ span > .log(< span class ="hljs-string "> 'Works like normal...'</ span > )
216
216
< span class ="hljs-built_in "> console</ span > .debug(< span class ="hljs-string "> '...but now controllable.'</ span > )
217
217
218
- < span class ="hljs-built_in "> console</ span > .verbosity(< span class ="hljs-number "> 3</ span > )
218
+ < span class ="hljs-built_in "> console</ span > .verbosity(< span class ="hljs-number "> 3</ span > ) < span class =" hljs-comment " > // Use numbered levels 5 (debug) to 1 (error) </ span >
219
219
220
220
< span class ="hljs-built_in "> console</ span > .debug(< span class ="hljs-string "> '...this isn’t printed now.'</ span > )
221
221
222
222
< span class ="hljs-built_in "> console</ span > .canWrite(< span class ="hljs-number "> 5</ span > ) && < span class ="hljs-built_in "> console</ span > .dir({< span class ="hljs-attr "> print</ span > : < span class ="hljs-string "> 'this won’t.'</ span > })
223
223
224
- < span class ="hljs-built_in "> console</ span > .verbosity(< span class ="hljs-number " > 5 </ span > )
224
+ < span class ="hljs-built_in "> console</ span > .verbosity(< span class ="hljs-string " > 'debug' </ span > ) < span class =" hljs-comment " > // Use named levels [debug, info, log, warning, error] </ span >
225
225
226
226
< span class ="hljs-built_in "> console</ span > .canWrite(< span class ="hljs-number "> 5</ span > ) && < span class ="hljs-built_in "> console</ span > .dir({< span class ="hljs-attr "> print</ span > : < span class ="hljs-string "> 'this will now.'</ span > })</ pre >
227
227
< p > This will direct all console output to stderr, but silence 'info' and 'debug' messages.</ p >
@@ -278,7 +278,7 @@ <h3 class='left m0 panel-title' id='createconsole'>
278
278
</ h3 >
279
279
280
280
281
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/index.js#L15-L17 '>
281
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/index.js#L15-L17 '>
282
282
< span > src/index.js</ span >
283
283
</ a >
284
284
@@ -354,7 +354,7 @@ <h3 class='left m0 panel-title' id='getversion'>
354
354
</ h3 >
355
355
356
356
357
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/index.js#L25-L25 '>
357
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/index.js#L25-L25 '>
358
358
< span > src/index.js</ span >
359
359
</ a >
360
360
@@ -430,7 +430,7 @@ <h3 class='left m0 panel-title' id='verbosity'>
430
430
</ h3 >
431
431
432
432
433
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/lib/verbosity.class.js#L31-L288 '>
433
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/lib/verbosity.class.js#L32-L303 '>
434
434
< span > src/lib/verbosity.class.js</ span >
435
435
</ a >
436
436
@@ -503,6 +503,8 @@ <h3 class='left m0 panel-title' id='verbosity'>
503
503
504
504
< tr >
505
505
< td class ='break-word '> < span class ='code bold '> options.verbosity</ span > < code class ='quiet '> < a href ="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number "> Number</ a > </ code >
506
+
507
+ (default < code > 3</ code > )
506
508
</ td >
507
509
< td class ='break-word '> < span > The verboseness of output:
508
510
0: Mute
@@ -534,6 +536,17 @@ <h3 class='left m0 panel-title' id='verbosity'>
534
536
535
537
536
538
539
+ < tr >
540
+ < td class ='break-word '> < span class ='code bold '> options.global</ span > < code class ='quiet '> < a href ="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean "> Boolean</ a > </ code >
541
+
542
+ (default < code > true</ code > )
543
+ </ td >
544
+ < td class ='break-word '> < span > Should changes to verbosity be made globally?
545
+ </ span > </ td >
546
+ </ tr >
547
+
548
+
549
+
537
550
< tr >
538
551
< td class ='break-word '> < span class ='code bold '> options.prefix</ span > < code class ='quiet '> < a href ="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String "> String</ a > </ code >
539
552
</ td >
@@ -587,7 +600,7 @@ <h3 class='left m0 panel-title' id='verbosity'>
587
600
< div class ='clearfix '>
588
601
589
602
590
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/lib/verbosity.class.js#L81-L88 '>
603
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/lib/verbosity.class.js#L89-L103 '>
591
604
< span > src/lib/verbosity.class.js</ span >
592
605
</ a >
593
606
@@ -597,7 +610,7 @@ <h3 class='left m0 panel-title' id='verbosity'>
597
610
< p > Set the current verbosity.</ p >
598
611
599
612
600
- < div class ='pre p1 bg-darken-1 mt0 rounded signature '> verbosity(level: < a href ="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number "> Number</ a > ) → < a href ="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number "> Number</ a > </ div >
613
+ < div class ='pre p1 bg-darken-1 mt0 rounded signature '> verbosity(level: ( < a href ="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number "> Number</ a > | < a href =" https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String " > String </ a > ) ) → < a href ="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number "> Number</ a > </ div >
601
614
602
615
603
616
@@ -614,8 +627,8 @@ <h3 class='left m0 panel-title' id='verbosity'>
614
627
615
628
< div class ='space-bottom0 '>
616
629
< div >
617
- < span class ='code bold '> level</ span > < code class ='quiet '> (< a href ="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number "> Number</ a > )</ code >
618
- The current level (0 to 5).
630
+ < span class ='code bold '> level</ span > < code class ='quiet '> (( < a href ="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number "> Number</ a > | < a href =" https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String " > String </ a > ) )</ code >
631
+ The current level (0 to 5) or level name .
619
632
620
633
</ div >
621
634
@@ -664,7 +677,7 @@ <h3 class='left m0 panel-title' id='verbosity'>
664
677
< div class ='clearfix '>
665
678
666
679
667
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/lib/verbosity.class.js#L95-L98 '>
680
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/lib/verbosity.class.js#L110-L113 '>
668
681
< span > src/lib/verbosity.class.js</ span >
669
682
</ a >
670
683
@@ -742,7 +755,7 @@ <h3 class='left m0 panel-title' id='verbosity'>
742
755
< div class ='clearfix '>
743
756
744
757
745
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/lib/verbosity.class.js#L130-L132 '>
758
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/lib/verbosity.class.js#L145-L147 '>
746
759
< span > src/lib/verbosity.class.js</ span >
747
760
</ a >
748
761
@@ -820,7 +833,7 @@ <h3 class='left m0 panel-title' id='verbosity'>
820
833
< div class ='clearfix '>
821
834
822
835
823
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/lib/verbosity.class.js#L130-L132 '>
836
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/lib/verbosity.class.js#L145-L147 '>
824
837
< span > src/lib/verbosity.class.js</ span >
825
838
</ a >
826
839
@@ -898,7 +911,7 @@ <h3 class='left m0 panel-title' id='verbosity'>
898
911
< div class ='clearfix '>
899
912
900
913
901
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/lib/verbosity.class.js#L139-L141 '>
914
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/lib/verbosity.class.js#L154-L156 '>
902
915
< span > src/lib/verbosity.class.js</ span >
903
916
</ a >
904
917
@@ -976,7 +989,7 @@ <h3 class='left m0 panel-title' id='verbosity'>
976
989
< div class ='clearfix '>
977
990
978
991
979
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/lib/verbosity.class.js#L148-L150 '>
992
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/lib/verbosity.class.js#L163-L165 '>
980
993
< span > src/lib/verbosity.class.js</ span >
981
994
</ a >
982
995
@@ -1054,7 +1067,7 @@ <h3 class='left m0 panel-title' id='verbosity'>
1054
1067
< div class ='clearfix '>
1055
1068
1056
1069
1057
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/lib/verbosity.class.js#L157-L159 '>
1070
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/lib/verbosity.class.js#L172-L174 '>
1058
1071
< span > src/lib/verbosity.class.js</ span >
1059
1072
</ a >
1060
1073
@@ -1132,7 +1145,7 @@ <h3 class='left m0 panel-title' id='verbosity'>
1132
1145
< div class ='clearfix '>
1133
1146
1134
1147
1135
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/lib/verbosity.class.js#L166-L168 '>
1148
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/lib/verbosity.class.js#L181-L183 '>
1136
1149
< span > src/lib/verbosity.class.js</ span >
1137
1150
</ a >
1138
1151
@@ -1210,7 +1223,7 @@ <h3 class='left m0 panel-title' id='verbosity'>
1210
1223
< div class ='clearfix '>
1211
1224
1212
1225
1213
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/lib/verbosity.class.js#L175-L177 '>
1226
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/lib/verbosity.class.js#L190-L192 '>
1214
1227
< span > src/lib/verbosity.class.js</ span >
1215
1228
</ a >
1216
1229
@@ -1288,7 +1301,7 @@ <h3 class='left m0 panel-title' id='verbosity'>
1288
1301
< div class ='clearfix '>
1289
1302
1290
1303
1291
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/lib/verbosity.class.js#L184-L186 '>
1304
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/lib/verbosity.class.js#L199-L201 '>
1292
1305
< span > src/lib/verbosity.class.js</ span >
1293
1306
</ a >
1294
1307
@@ -1366,7 +1379,7 @@ <h3 class='left m0 panel-title' id='verbosity'>
1366
1379
< div class ='clearfix '>
1367
1380
1368
1381
1369
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/lib/verbosity.class.js#L193-L195 '>
1382
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/lib/verbosity.class.js#L208-L210 '>
1370
1383
< span > src/lib/verbosity.class.js</ span >
1371
1384
</ a >
1372
1385
@@ -1444,7 +1457,7 @@ <h3 class='left m0 panel-title' id='verbosity'>
1444
1457
< div class ='clearfix '>
1445
1458
1446
1459
1447
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/lib/verbosity.class.js#L202-L207 '>
1460
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/lib/verbosity.class.js#L217-L222 '>
1448
1461
< span > src/lib/verbosity.class.js</ span >
1449
1462
</ a >
1450
1463
@@ -1523,7 +1536,7 @@ <h3 class='left m0 panel-title' id='verbosity'>
1523
1536
< div class ='clearfix '>
1524
1537
1525
1538
1526
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/lib/verbosity.class.js#L228-L240 '>
1539
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/lib/verbosity.class.js#L243-L255 '>
1527
1540
< span > src/lib/verbosity.class.js</ span >
1528
1541
</ a >
1529
1542
@@ -1629,7 +1642,7 @@ <h3 class='left m0 panel-title' id='verbosity'>
1629
1642
< div class ='clearfix '>
1630
1643
1631
1644
1632
- < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/f54cc3a10606b613baeb95fa37497169e6e0d418 /src/lib/verbosity.class.js#L260-L287 '>
1645
+ < a class ='pl3 pr1 right rounded github ' href ='https://github.com/MarkGriffiths/verbosity/blob/a46aef135100739b56d52865eafdba6d5508a71c /src/lib/verbosity.class.js#L275-L302 '>
1633
1646
< span > src/lib/verbosity.class.js</ span >
1634
1647
</ a >
1635
1648
0 commit comments