MCPcopy
hub / github.com/simstudioai/sim / stripEnumPrefix

Function stripEnumPrefix

apps/sim/tools/temporal/utils.ts:205–208  ·  view source on GitHub ↗
(value: string | undefined, prefix: string)

Source from the content-addressed store, hash-verified

203
204/** Strips a protobuf enum prefix (e.g. `WORKFLOW_EXECUTION_STATUS_RUNNING` → `RUNNING`). */
205export function stripEnumPrefix(value: string | undefined, prefix: string): string | null {
206 if (!value) return null
207 return value.startsWith(prefix) ? value.slice(prefix.length) : value
208}
209
210/**
211 * Formats a seconds count as a protobuf JSON duration string (e.g. 3600 → `"3600s"`).

Callers 5

update_workflow.tsFile · 0.90
query_workflow.tsFile · 0.90
mapExecutionInfoFunction · 0.85
mapHistoryEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected