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

Function parseSettingState

src/platforms/setting-state.ts:3–8  ·  view source on GitHub ↗
(state: string)

Source from the content-addressed store, hash-verified

1import { AppError } from '../kernel/errors.ts';
2
3export function parseSettingState(state: string): boolean {
4 const normalized = state.toLowerCase();
5 if (normalized === 'on' || normalized === 'true' || normalized === '1') return true;
6 if (normalized === 'off' || normalized === 'false' || normalized === '0') return false;
7 throw new AppError('INVALID_ARGS', `Invalid setting state: ${state}`);
8}

Callers 2

setAndroidSettingFunction · 0.90
setIosSettingFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected