Polyman Documentation - v3.1.0
    Preparing search index...

    Function readHiddenLine

    • Asks for a secret on the terminal with echo off. Enter ends the input, Backspace removes the last character, Ctrl+C cancels. Escape sequences are removed from the input, also when a chunk ends in the middle of one: CSI (arrow keys, Delete, paste markers, keeping the pasted text), SS3 (ESC O and a key), and ESC with the one character after it (Alt+key). A control character inside a sequence ends it and is handled as usual, so Enter and Ctrl+C always work.

      Parameters

      • question: string
      • input: SecretInput = process.stdin
      • output: WritableStream = process.stderr

      Returns Promise<string>