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

Function isOneOf

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

Source from the content-addressed store, hash-verified

144};
145
146const isOneOf = <T extends string>(
147 values: readonly T[],
148 value: unknown,
149): value is T => values.includes(value as T);
150
151const isText = (value: unknown): value is string =>
152 typeof value === 'string' && value.length > 0;

Callers 1

toPatchyConfigFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected