Neverending Pile of Messages
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@bemoje/is-number

1.0.1 • Public • Published

@bemoje/is-number

Determine whether a value is a number or not.

Version

NPM version

Travis CI

dependencies

Dependencies

dependencies

Stats

NPM downloads Forks

Donate

Buy Me A Beer donate button PayPal donate button

Installation

npm install @bemoje/is-number
npm install --save @bemoje/is-number
npm install --save-dev @bemoje/is-number

Usage

 
import isNumber from '@bemoje/is-number'
 
isNumber(3)
//=> true
 
isNumber(Number(3))
//=> true
 
isNumber(new Number(3))
//=> true
 
isNumber('3')
//=> false
 
isNumber(NaN)
//=> false
 
isNumber(Infinity)
//=> false
 
isNumber(Number.POSITIVE_INFINITY)
//=> false
 
isNumber(Number.NEGATIVE_INFINITY)
//=> false
 
isNumber(Number.NaN)
//=> false
 
isNumber(Number.EPSILON)
//=> true
 
isNumber(Number.MAX_SAFE_INTEGER)
//=> true
 
isNumber(Number.MIN_SAFE_INTEGER)
//=> true
 
isNumber(Number.MIN_VALUE)
//=> true
 
isNumber(Number.MAX_VALUE)
//=> true
 

Tests

Uses Jest to test module functionality. Run tests to get coverage details.

npm run test

API

Table of Contents

isNumber

Determine whether a value is a number or not.

Parameters
  • value any The value

Returns boolean

Install

npm i @bemoje/is-number

DownloadsWeekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

7.39 kB

Total Files

5

Last publish

Collaborators

  • avatar