MCPcopy Create free account
hub / github.com/simstudioai/sim / toEntries

Function toEntries

apps/sim/lib/workflows/triggers/triggers.ts:131–140  ·  view source on GitHub ↗
(blocks: Record<string, T> | T[])

Source from the content-addressed store, hash-verified

129}
130
131function toEntries<T extends MinimalBlock>(blocks: Record<string, T> | T[]): Array<[string, T]> {
132 if (Array.isArray(blocks)) {
133 return blocks.map((block, index) => {
134 const potentialId = (block as { id?: unknown }).id
135 const inferredId = typeof potentialId === 'string' ? potentialId : `${index}`
136 return [inferredId, block]
137 })
138 }
139 return Object.entries(blocks)
140}
141
142type ResolveStartOptions = {
143 execution: StartExecutionKind

Callers 1

resolveStartCandidatesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected