MCPcopy Create free account
hub / github.com/dailydotdev/apps / isOneOf

Function isOneOf

packages/shared/src/features/patchy/patchyConfig.ts:179–182  ·  view source on GitHub ↗
(
  values: readonly T[],
  value: unknown,
)

Source from the content-addressed store, hash-verified

177};
178
179const isOneOf = <T extends string>(
180 values: readonly T[],
181 value: unknown,
182): value is T => values.includes(value as T);
183
184const isText = (value: unknown): value is string =>
185 typeof value === 'string' && value.length > 0;

Callers 1

toPatchyConfigFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected