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

Function isIndexArgument

src/lib/command/command-util.ts:8–10  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

6const indexPattern = /^[1-9][0-9]*$/
7
8export function isIndexArgument(str: string): boolean {
9 return !!str.match(indexPattern)
10}
11
12export function itemName(command: Naming): string {
13 return command.itemName ?? 'item'

Callers 6

stringTranslateToIdFunction · 0.85
convertToIdFunction · 0.85
getComponentFromUserFunction · 0.85
getCapabilityFromUserFunction · 0.85
getCommandFromUserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected