feat(utils): add isNumber

This commit is contained in:
smyalygames 2023-02-17 02:53:55 +00:00
parent dda77483eb
commit 5503edd70b

View File

@ -16,6 +16,16 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* Checks if any parsed value is a number.
* @param number check if variable is a number
* @returns {boolean} true if it is a number
*/
export function isNumber(number: any) {
return !Number.isNaN(+number);
}
/**
* Creates a (PRNG) random integer between minimum and maximum both inclusive
* @param min minimum integer