UNPKG

pure-conditions

Version:
7 lines (5 loc) 162 B
function isNumeric (value) { const type = typeof value return (type === 'string' || type === 'number') && !isNaN(Number(value)) } module.exports = isNumeric