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

Function jsonFormatter

src/lib/command/output.ts:51–52  ·  view source on GitHub ↗
(indent: number)

Source from the content-addressed store, hash-verified

49export type OutputFormatter<T extends object> = (data: T) => string
50
51export const jsonFormatter = <T extends object>(indent: number): OutputFormatter<T> =>
52 (data: T) => JSON.stringify(data, null, indent)
53
54export const yamlFormatter = <T extends object>(indent: number): OutputFormatter<T> =>
55 (data: T) => yaml.dump(data, { indent })

Callers 2

buildOutputFormatterFunction · 0.85
output.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected