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

Method ifStandard

src/cli/OutputHandler.js:370–377  ·  view source on GitHub ↗

* Triggers the provided function, if standard output is enabled * Else does nothing. * * @param {Function} func to execute

(func)

Source from the content-addressed store, hash-verified

368 * @param {Function} func to execute
369 */
370 async ifStandard(func) {
371 // Does nothing if not enabled
372 if(!this.stdOutput) {
373 return;
374 }
375
376 await func();
377 }
378
379 /**
380 * Standard output log, enabled unless --silent is used

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected