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

Function extractRefId

apps/sim/tools/workday/soap.ts:663–673  ·  view source on GitHub ↗
(ref: WorkdayReference | undefined)

Source from the content-addressed store, hash-verified

661 * Handles the nested ID structure that Workday returns.
662 */
663export function extractRefId(ref: WorkdayReference | undefined): string | null {
664 if (!ref) return null
665 const id = ref.ID
666 if (Array.isArray(id)) {
667 return id[0]?.$value ?? id[0]?._ ?? null
668 }
669 if (id && typeof id === 'object') {
670 return id.$value ?? id._ ?? null
671 }
672 return null
673}

Callers 10

route.tsFile · 0.90
route.tsFile · 0.90
mapPlanFunction · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected