MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / read

Function read

src/lib/command/input-processor.ts:39–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37 const hasInput = (): boolean => !!filename
38
39 const read = async (): Promise<T> => {
40 if (!filename) {
41 throw ReferenceError('read called when hasInput returns false')
42 }
43
44 return parseJSONOrYAML(await readFile(filename, 'utf-8'), filename)
45 }
46
47 return { ioFormat, hasInput, read }
48}

Callers

nothing calls this directly

Calls 1

parseJSONOrYAMLFunction · 0.85

Tested by

no test coverage detected