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

Function compareObjectIds

apps/sim/lib/webhooks/polling/hubspot.ts:963–974  ·  view source on GitHub ↗

Numeric compare for HubSpot ids (decimal strings, treated numerically by GT/LT).

(a: string, b: string)

Source from the content-addressed store, hash-verified

961
962/** Numeric compare for HubSpot ids (decimal strings, treated numerically by GT/LT). */
963function compareObjectIds(a: string, b: string): number {
964 if (!a) return b ? -1 : 0
965 if (!b) return 1
966 const an = Number(a)
967 const bn = Number(b)
968 if (Number.isFinite(an) && Number.isFinite(bn)) {
969 if (an === bn) return 0
970 return an > bn ? 1 : -1
971 }
972 if (a === b) return 0
973 return a > b ? 1 : -1
974}

Callers 2

fetchHubSpotChangesFunction · 0.85
processRecordsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected