Mutable in-memory flag provider.
Flags can be added, removed, or replaced at runtime. Useful for tests and dynamic flag management within a single process.
MemoryProvider(initialFlags?: Readonly<Record<string, FlagDefinition>>)
readonly
type: "memory"
Provider type identifier.
isEnabled(flag: string,context?: FlagContext): boolean
Evaluates the flag against the current flag map.
removeFlag(name: string): void
Removes a flag by name.
replaceFlags(flags: Readonly<Record<string, FlagDefinition>>): void
Replaces all flags with a new set.
setFlag(name: string,def: FlagDefinition): void
Sets or updates a flag definition.
start(): Promise<void>
No-op — in-memory store needs no startup.
stop(): Promise<void>
No-op — in-memory store needs no shutdown.