MCPcopy Index your code
hub / github.com/callstack/agent-device / isStringMember

Function isStringMember

src/utils/string-enum.ts:7–12  ·  view source on GitHub ↗
(
  values: T,
  value: string,
)

Source from the content-addressed store, hash-verified

5 * a string-literal union). Narrows `value` to the tuple's element union.
6 */
7export function isStringMember<const T extends readonly string[]>(
8 values: T,
9 value: string,
10): value is T[number] {
11 return values.includes(value);
12}
13
14/**
15 * Strict (exact-match) parse for an `as const` string tuple. Throws an

Callers 3

runSwipeCoordinatesFunction · 0.90
parseStringMemberFunction · 0.85
defineStringEnumFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected