UNPKG

@guidepup/setup

Version:

Setup your environment for screen-reader automation.

17 lines (16 loc) 548 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.enabledDefaults = enabledDefaults; const child_process_1 = require("child_process"); const VOICE_OVER_APPLESCRIPT_ENABLED_DEFAULTS = "defaults read com.apple.VoiceOver4/default SCREnableAppleScript"; function enabledDefaults() { try { const result = (0, child_process_1.execSync)(VOICE_OVER_APPLESCRIPT_ENABLED_DEFAULTS, { encoding: "utf8", }); return result.trim() === "1"; } catch { return false; } }