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

Function displayNoneForEmpty

src/lib/user-query.ts:17–17  ·  view source on GitHub ↗
(input, { isFinal })

Source from the content-addressed store, hash-verified

15
16// Converts the empty string entered by the user to the word 'none` for the user when entering optional numbers.
17export const displayNoneForEmpty: TransformerFunction = (input, { isFinal }) => isFinal && input === '' ? 'none' : input
18
19export type DefaultValueOrFn<T> = T | (() => T)
20

Callers 1

user-query.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected