Class Utils

Hierarchy

  • Utils

Constructors

Methods

  • Parameters

    • name: string

    Returns Debugger

  • A delay promise

    Returns

    void

    Parameters

    • ms: number

      time to wait im ms

    Returns CancellablePromise<void>

  • Parses an Android-formatted mincrypt public key (e.g. ~/.android/adbkey.pub).

    Returns

    The key as a forge.pki public key. You may need node-forge for complicated operations.

    Parameters

    • keyString: string

      The key String or [Buffer][node-buffer] to parse. Not a filename.

    Returns Promise<ExtendedPublicKey>

  • Takes a [Stream][node-stream] and reads everything it outputs until the stream ends. Then it resolves with the collected output. Convenient with client.shell().

    Returns

    All the output as a [Buffer][node-buffer]. Use output.toString('utf-8') to get a readable string from it.

    Parameters

    • stream: Duplex

      The [Stream][node-stream] to read.

    Returns Promise<Buffer>

  • Promise waiter for a Duplex to be readable

    Returns

    is the true is duplex is readable

    Parameters

    • Optional duplex: Duplex | PromiseDuplex<Duplex>

      a vanilla Duplex of a PromiseDuplex

    • timeout: number = 0

      do not wait more than timeout

    • _debugCtxt: string = ''

    Returns Promise<boolean>

  • Wait for a spesific text in the Duplex all text will be concatened in a single string to dean with segments.

    Returns

    matched text

    Parameters

    • duplex: PromiseDuplex<Duplex>
    • expected: RegExp

      regexp to match

    • timeout: number = 10000

    Returns Promise<string>

Generated using TypeDoc