* JSON output, to be handled if the respective mode is enabled * * @param {Object} data to json output
(data)
| 687 | * @param {Object} data to json output |
| 688 | */ |
| 689 | json(data) { |
| 690 | // Does nothing if not enabled |
| 691 | if(!this.jsonOutput && this.jsonOutputFile) { |
| 692 | return; |
| 693 | } |
| 694 | |
| 695 | // Get the JSON stringified content |
| 696 | let jsonStr = JSON.stringify( data, null, 3 ); |
| 697 | |
| 698 | // JSON output handling |
| 699 | if( this.jsonOutput ) { |
| 700 | console.log( jsonStr ); |
| 701 | } |
| 702 | |
| 703 | // @TODO --jsonOutputFile handling |
| 704 | } |
| 705 | } |
| 706 | |
| 707 | // Actual module export |
nothing calls this directly
no outgoing calls
no test coverage detected