Class Monkey

Hierarchy (view full)

Constructors

  • Parameters

    • Optional options: EventEmitterOptions

    Returns Monkey

Properties

parser: Monkey.Parser = ...
queue: BaseCommand<unknown>[] = []
stream_: null | Socket = null
timeout: undefined | Timeout = undefined

Accessors

Methods

  • Allows executing commands in a queue.

    Returns CommandQueue

    Example

    monkey
    .commandQueue()
    .touchDown(100, 0)
    .sleep(5)
    .touchUp(100, 0)
    .execute((err, values) => {
    monkey.end();
    });
  • Parameters

    • event: "error"
    • listener: ((err) => void)
        • (err): void
        • Parameters

          • err: Error

          Returns void

    Returns this

  • Parameters

    • event: "end" | "finish" | "close"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

  • Writes commands to monkey stream.

    Parameters

    Returns this

    Example

    monkey.send('key event 24', (err, value, command) => {});