MCPcopy Index your code
hub / github.com/SmartThingsCommunity/smartthings-cli / writeOutput

Function writeOutput

src/lib/command/output.ts:73–82  ·  view source on GitHub ↗
(dataStr: string, filename?: string)

Source from the content-addressed store, hash-verified

71}
72
73export const writeOutput = async (dataStr: string, filename?: string): Promise<void> => {
74 if (filename) {
75 await writeFile(filename, dataStr)
76 } else {
77 process.stdout.write(dataStr)
78 if (!dataStr.endsWith('\n')) {
79 process.stdout.write('\n')
80 }
81 }
82}

Callers 8

handlerFunction · 0.85
handlerFunction · 0.85
handlerFunction · 0.85
handlerFunction · 0.85
inputAndOutputItemFunction · 0.85
formatAndWriteItemFunction · 0.85
formatAndWriteListFunction · 0.85
output.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected