PenaltyBox.prototype.has
Add an entry into the PenaltyBox for the duration of the given timeToLive.
Syntax
add(entry, timeToLive)
Parameters
entry: string- The name of the entry to look up
timeToLive: number- In minutes, how long the entry should be added into the PenaltyBox
- Valid
timeToLiveis 1 minute to 60 minutes andtimeToLivevalue is truncated to the nearest minute.
Return value
Returns undefined.
Exceptions
TypeError- Thrown if the provided
entryvalue can not be coerced into a string - Thrown if the provided
timeToLivevalue is not either, a number between 1 and 60 inclusively.
- Thrown if the provided