MCPcopy Index your code
hub / github.com/SmartThingsCommunity/smartthings-cli / withLocation

Function withLocation

src/lib/api-helpers.ts:32–33  ·  view source on GitHub ↗
(item: T)

Source from the content-addressed store, hash-verified

30 const locationNameById = await buildLocationNamesById(client)
31
32 const withLocation = <T extends WithLocation>(item: T): T & WithNamedLocation =>
33 ({ ...item, location: item.locationId ? locationNameById.get(item.locationId) ?? '<invalid locationId>' : '' })
34
35 return list.map(item => withLocation(item))
36}

Callers 5

verboseInstalledAppFunction · 0.85
handlerFunction · 0.85
handlerFunction · 0.85
withLocationsFunction · 0.85

Calls 1

withLocationsFunction · 0.85

Tested by

no test coverage detected