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

Function promptFromNaming

src/lib/command/select.ts:21–23  ·  view source on GitHub ↗
(config: Naming)

Source from the content-addressed store, hash-verified

19export const indefiniteArticleFor = (name: string): string => name.match(/^[aeio]/i) ? 'an' : 'a'
20
21function promptFromNaming(config: Naming): string | undefined {
22 return config.itemName ? `Select ${indefiniteArticleFor(config.itemName)} ${config.itemName}.` : undefined
23}
24
25export type PromptUserFlags = BuildOutputFormatterFlags
26export const promptUserBuilder = buildOutputFormatterBuilder

Callers 1

promptUserFunction · 0.85

Calls 1

indefiniteArticleForFunction · 0.85

Tested by

no test coverage detected