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

Function extractPropertyTimestampMs

apps/sim/lib/webhooks/polling/hubspot.ts:721–729  ·  view source on GitHub ↗
(record: HubSpotSearchResult, propertyName: string)

Source from the content-addressed store, hash-verified

719}
720
721function extractPropertyTimestampMs(record: HubSpotSearchResult, propertyName: string): number {
722 const raw = record.properties?.[propertyName]
723 if (raw) {
724 const ms = Date.parse(raw)
725 if (Number.isFinite(ms)) return ms
726 }
727 const fallback = propertyName === 'createdate' ? record.createdAt : record.updatedAt
728 return fallback ? Date.parse(fallback) : Number.NaN
729}
730
731async function processRecords(
732 records: HubSpotSearchResult[],

Callers 2

fetchHubSpotChangesFunction · 0.85
processRecordsFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected