UNPKG

@guidepup/setup

Version:

Setup your environment for screen-reader automation.

16 lines (15 loc) 605 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getNvdaRegistryData = getNvdaRegistryData; const regedit_1 = require("regedit"); const constants_1 = require("./constants"); const errors_1 = require("../errors"); async function getNvdaRegistryData() { try { const { [constants_1.SUB_KEY_GUIDEPUP_NVDA]: { exists, values }, } = await regedit_1.promisified.list([constants_1.SUB_KEY_GUIDEPUP_NVDA]); return { exists, values }; } catch (e) { throw new Error(`${errors_1.ERR_WINDOWS_UNABLE_TO_ACCESS_REGISTRY}\n\n${e.message}`); } }