Classes
Methods
(static) failedLogin() → {Promise}
Creates a new promise and immediately rejects it
Returns:
Always rejected promise which resolves to "Invalid credentials"
- Type
- Promise
(static) validateNum(n, d) → {number}
Validates a number to be inserted into MariaDB
Parameters:
Name | Type | Default | Description |
---|---|---|---|
n |
number | Number to validate | |
d |
number | 0 | Default value to return in the case of invalid input. Defaults to 0 |
Returns:
A number which is guaranteed to be valid. Returns d in n is invalid
- Type
- number