UNPKG

verificator

Version:

Client and server-side validation JavaScript library

7 lines (5 loc) 208 B
const isNumeric = (value: any): boolean => { const type = typeof value return (type === 'number' || type === 'string') && !isNaN(Number(value) - parseFloat(String(value))) } export default isNumeric