UNPKG

@yume-chan/scrcpy

Version:
16 lines 509 B
export function parseDisplay(line) { // The client-side option name is `--display` // but the server-side option name is always `display_id` const match = line.match(/^\s+--display=(\d+)\s+\(([^)]+)\)$/); if (match) { const display = { id: Number.parseInt(match[1], 10), }; if (match[2] !== "size unknown") { display.resolution = match[2]; } return display; } return undefined; } //# sourceMappingURL=parse-display.js.map