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

Function isOneOf

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

Source from the content-addressed store, hash-verified

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

Callers 1

toPatchyConfigFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected