MCPcopy Index your code
hub / github.com/simstudioai/sim / getIdArray

Function getIdArray

apps/sim/tools/trello/shared.ts:57–73  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

55}
56
57export function getIdArray(value: unknown): string[] {
58 if (!Array.isArray(value)) {
59 return []
60 }
61
62 return value.flatMap((item) => {
63 if (typeof item === 'string' && item.trim().length > 0) {
64 return [item]
65 }
66
67 if (isRecordLike(item) && typeof item.id === 'string' && item.id.trim().length > 0) {
68 return [item.id]
69 }
70
71 return []
72 })
73}
74
75function mapTrelloLabel(value: unknown): TrelloLabel | null {
76 if (!isRecordLike(value) || typeof value.id !== 'string') {

Callers 3

add_label.tsFile · 0.90
add_member.tsFile · 0.90
mapTrelloCardFunction · 0.85

Calls 1

isRecordLikeFunction · 0.90

Tested by

no test coverage detected