Merge pull request #11624 from overleaf/jpa-hybrid-download-params

[web] add split tests for tweaking user content domain access check

GitOrigin-RevId: a5e6959098c10ea230634492b465c2b9dcdd909f
This commit is contained in:
Jakob Ackermann
2023-02-02 11:58:41 +00:00
committed by Copybot
parent 635f2969ba
commit e63b90d288
5 changed files with 48 additions and 9 deletions
@@ -0,0 +1,14 @@
import getMeta from './meta'
export function isSplitTestEnabled(name: string) {
return getMeta('ol-splitTestVariants')?.[name] === 'enabled'
}
export function parseIntFromSplitTest(name: string, defaultValue: number) {
const v = getMeta('ol-splitTestVariants')?.[name]
const n = parseInt(v, 10)
if (v === 'default' || Number.isNaN(n)) {
return defaultValue
}
return n
}