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

Function readPressSeriesOptions

src/core/dispatch-interactions.ts:309–317  ·  view source on GitHub ↗
(context: DispatchContext | undefined)

Source from the content-addressed store, hash-verified

307}
308
309function readPressSeriesOptions(context: DispatchContext | undefined): PressSeriesOptions {
310 return {
311 count: readContextInt(context?.count, 1, 'count', 1, 200),
312 intervalMs: readContextInt(context?.intervalMs, 0, 'interval-ms', 0, 10_000),
313 holdMs: readContextInt(context?.holdMs, 0, 'hold-ms', 0, 10_000),
314 jitterPx: readContextInt(context?.jitterPx, 0, 'jitter-px', 0, 100),
315 doubleTap: Boolean(context?.doubleTap),
316 };
317}
318
319function readContextInt(
320 value: number | undefined,

Callers 1

handlePressCommandFunction · 0.85

Calls 1

readContextIntFunction · 0.85

Tested by

no test coverage detected