Migrate toClout

This commit is contained in:
Eric Bailey
2026-01-21 13:50:10 -06:00
parent 9aa04712f8
commit 9ecb866497
5 changed files with 24 additions and 24 deletions
+1
View File
@@ -2,4 +2,5 @@ import {MetricsClient} from '#/analytics/metrics/client'
import {type Events} from '#/analytics/metrics/types'
export type {Events as Metrics} from '#/analytics/metrics/types'
export * from '#/analytics/metrics/utils'
export const metrics = new MetricsClient<Events>()
+7
View File
@@ -0,0 +1,7 @@
export function toClout(n: number | null | undefined): number | undefined {
if (n == null) {
return undefined
} else {
return Math.max(0, Math.round(Math.log(n)))
}
}