@bakaburg24/decisioning-flag
v0.1.0
Published
Tiny rollout-gate for the decisioning SDK. Hash-based stable per-user bucketing with an env-var fallback. No A/B tracking — just a gate.
Maintainers
Readme
@bakaburg24/decisioning-flag
Tiny rollout-gate for @bakaburg24/decisioning-js. Hash-based stable
per-user bucketing with an env-var fallback. No A/B tracking — this
is just a gate, not a feature-flag platform.
import { DecisioningFlag } from '@bakaburg24/decisioning-flag';
const flag = new DecisioningFlag({
configUrl: process.env.DECISIONING_FLAG_URL,
fallback: process.env.DECISIONING_FLAG_DEFAULT === 'true',
rolloutKey: anonymousId,
});
await flag.load();
if (flag.enabled) {
// initialise the decisioning SDK
}The remote config returns { enabled: boolean, rolloutPercent: 0-100 }.
Bucket assignment is deterministic (fnv1a(key) % 100 < rolloutPercent),
cached in localStorage for 5 minutes, and falls back to the supplied
default on any fetch error.
