Constructor
# new NumberPrompt()
Methods
# (async, static) multi(promptInfo, amount) → {Promise.<Array.<Number>>}
Prompts the user for multiple numbers. Can specify the amount of numbers to prompt for.
Parameters:
Name | Type | Description |
---|---|---|
promptInfo |
PromptInfo | |
amount |
Number | the amount of numbers to prompt and accept |
Throws:
-
-
if the user does not respond within the given time.
- Type
- TimeOutError
-
-
-
if the user cancels the prompt.
- Type
- CancelError
-
Returns:
- Type
- Promise.<Array.<Number>>
# (async, static) single(promptInfo) → {Promise.<Number>}
Prompts the user for one number.
Parameters:
Name | Type | Description |
---|---|---|
promptInfo |
PromptInfo |
Throws:
-
-
if the user does not respond within the given time.
- Type
- TimeOutError
-
-
-
if the user cancels the prompt.
- Type
- CancelError
-
Returns:
- Type
- Promise.<Number>