checks if given string is a valid weapon name
Returns: Boolean
- true: is a weapon name, false: is not a weapon name
Author: Jimmy Doughten https://github.com/dough10
Param | Type | Description |
---|---|---|
weapon | String |
name of a weapon |
Example (Example usage of isWeapon() function.)
var mag = isWeapon('357');
// console.log(mag) = true
// or
if (!isWeapon('357') {
return;
}
// it is a weapon name