Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function isDeviceAttached() {
let devices = await exec.promise("./adb devices | awk '!/List of devices/ && NF' | wc -l", options);
return parseInt(devices) > 0;
}
async function isExponentInstalledAsync() {
let numberOfExponentApps = await exec.promise("./adb shell 'pm list packages -f' | grep 'host.exp.exponent' | wc -l", options);
return parseInt(numberOfExponentApps) > 0;
}