Validate a number
The raw input
isNumber(1) >> { valid: true, parsed: 1, }; isNumber("") >> { valid: false, error: 'Not a number: ""', }; Copy
isNumber(1) >> { valid: true, parsed: 1, }; isNumber("") >> { valid: false, error: 'Not a number: ""', };
Validate a number