Skip to content

evaluateExperiences

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/api/src/tours/tour-targeting.ts

Server-side evaluation for the public config endpoint: keep only LIVE experiences whose URL rules and segments match, ordered by priority (desc) then age (oldest first — stable, deterministic).

Signature

ts
function evaluateExperiences(experiences: T[], ctx: { url: string; segments?: string[] }): T[]

Parameters

NameType
experiencesT[]
ctx{ url: string; segments?: string[] }

Returns: T[]

Was this page helpful?

Download as PDF