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

Function matchesDeviceSelector

src/kernel/device.ts:294–304  ·  view source on GitHub ↗
(
  device: DeviceInfo,
  selector: DeviceSelector,
  options: { includeExplicitSelectors?: boolean } = {},
)

Source from the content-addressed store, hash-verified

292}
293
294export function matchesDeviceSelector(
295 device: DeviceInfo,
296 selector: DeviceSelector,
297 options: { includeExplicitSelectors?: boolean } = {},
298): boolean {
299 return (
300 matchesPlatformSelector(device, selector.platform) &&
301 (!selector.target || (device.target ?? 'mobile') === selector.target) &&
302 (!options.includeExplicitSelectors || matchesExplicitDeviceSelector(device, selector))
303 );
304}
305
306function matchesExplicitDeviceSelector(device: DeviceInfo, selector: DeviceSelector): boolean {
307 if (selector.udid && !(device.id === selector.udid && isApplePlatform(device.platform))) {

Callers 2

resolveDeviceFunction · 0.85

Calls 2

matchesPlatformSelectorFunction · 0.85

Tested by

no test coverage detected