Kind: Function
Source: atloria-monorepo/apps/api/src/tours/tour-targeting.ts
D4 — flatten VERIFIED reader attrs (from the signed reader token, never a
host-declared string) into targetable segment strings. Each primitive value
yields both a bare segment (enterprise) and a namespaced one (plan:enterprise)
so an owner can target either; array values expand element-wise. This is what
segment rules evaluate against once a reader has a verified identity — a spoofed
data-segments can no longer grant a targeted experience.
Signature
tsfunction attrsToSegments(attrs: Record<string, unknown> | null | undefined): string[]
Parameters
| Name | Type |
|---|---|
attrs | `Record<string, unknown> |
Returns: string[]
Was this page helpful?