UNPKG

166 BJavaScriptView Raw
1const isNumericInt = (x) => /^[-+]?\d+$/.test(x);
2const isNumericFloat = (x) => /^[-+]?\d*\.?\d+(e[-+]?\d+)?$/i.test(x);
3export {
4 isNumericFloat,
5 isNumericInt
6};