Function to determine if something is a number type
npm install --save @chriscodesthings/is-number
import isNumber from '@chriscodesthings/is-number';
console.log(isNumber(123));
// => true
isNumber(var);
- var: any
Returns boolean true
if var is a number type, false
otherwise.
Does what it says on the tin.