UNPKG

@u4/adbkit

Version:

A Typescript client for the Android Debug Bridge.

16 lines 456 B
import Command from '../../command.js'; const RE_OK = /restarting in/; export default class UsbCommand extends Command { async execute() { await this._send('usb:'); await this.readOKAY(); const value = await this.parser.readAll(); if (RE_OK.test(value.toString())) { return true; } else { throw new Error(value.toString().trim()); } } } //# sourceMappingURL=usb.js.map