UNPKG

mathball

Version:

A JavaScript library for Competitive Programming

11 lines (9 loc) 247 B
'use strict'; /* * Number Validation */ module.exports = function (arg, func) { if (typeof arg != 'number') { throw new TypeError('Invalid argument received - ' + JSON.stringify(arg) + '\n\'' + func + '()\' only accept a number!\n'); } };