# flags

function in `@dioramajs/diorama/kit`

```ts
import { flags } from '@dioramajs/diorama/kit'
```

Reads a switch list param such as `close="esc backdrop swipe"`: the known names it holds,
in any order, separated by spaces or commas. `'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.

```ts
function flags<T extends string>(
  value: string,
  known: readonly T[],
): { readonly on: ReadonlySet<T>; readonly unknown: readonly string[] }
```

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `string` |  |
| `known` | `readonly T[]` |  |

Also exported from `@dioramajs/effects/kit`.

Defined in [packages/effects/src/kit.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/effects/src/kit.ts#L255).
