• A function that can be used to prompt the user for a confirmation.

    Parameters

    • prompt: string

      A string containing the question to be asked to the user.

    • yes: string[] = ...

      An optional array of strings containing values that will be treated as a 'yes'. If none provided, ["yes", "y"] will be used as default.

    Returns Promise<boolean>

    A Promise that resolves to a boolean value indicating whether the user accepted or declined.

    Note

    For convenience, the values in yes as well as the user input will be converted to lowercase before the condition gets evaluated. For instance, if the user input is 'OUI', but yes = ['oui'], a positive result will still be obtained.

    Note

    This function uses the read package internally.

Generated using TypeDoc