flags function
Reads a switch list param such as `close="esc backdrop swipe"`: the known names it holds, in any order, separated by spaces or commas.
import { flags } from '@dioramajs/diorama/kit'. 'all' or '*' turns on all of them, an empty string none. Unknown names are left out and returned, so the effect can note them once.
function flags<T extends string>(
value: string,
known: readonly T[],
): { readonly on: ReadonlySet<T>; readonly unknown: readonly string[] }Parameters
| Name | Type | Description |
|---|---|---|
value | string | |
known | readonly T[] |
Also exported from @dioramajs/effects/kit.
Defined in packages/effects/src/kit.ts.