MCPcopy Create free account
hub / github.com/PicoCreator/smol-dev-js / json

Method json

src/cli/OutputHandler.js:689–704  ·  view source on GitHub ↗

* JSON output, to be handled if the respective mode is enabled * * @param {Object} data to json output

(data)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected