is-actual-number
v1.0.2
Published
Check if a value is a number. Way better than is-number.
Downloads
13
Readme
is-a-number
is-number
is trash. jonschlinkert will never listen to the PRs and optimization issues. Well, is-a-number
is here to fix that. I will listen to your pull requests! And there is other features too.
Installation
NPM:
npm i is-actual-number
Yarn:
yarn add is-actual-number
PNPM:
pnpm add is-actual-number
Usage
const isNumber = require('is-actual-number')
console.log(isNumber(1)) // true
console.log(isNumber('1', { allowNumberStrings: false })) // false
console.log(isNumber('1')) // true
console.log(isNumber(Infinity)) // false
console.log(isNumber(Infinity, { allowInfinite: true })) // true