MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / extractCohortId

Function extractCohortId

packages/db/src/services/chart.service.ts:166–171  ·  view source on GitHub ↗
(breakdownName: string)

Source from the content-addressed store, hash-verified

164}
165
166export function extractCohortId(breakdownName: string): string | null {
167 if (breakdownName.startsWith('cohort:')) {
168 return breakdownName.split(':')[1] ?? null;
169 }
170 return null;
171}
172
173export function isAllCohortsBreakdown(breakdownName: string): boolean {
174 return breakdownName === 'cohort';

Callers 7

getFunnelMethod · 0.90
getConversionMethod · 0.90
isKnownEventFieldFunction · 0.85
getSelectPropertyKeyFunction · 0.85
getChartSqlFunction · 0.85
getAggregateChartSqlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected