Socket
Socket
Sign inDemoInstall

isnumber

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    isnumber

A simple test to see if a value is a non-infinite number.


Version published
Maintainers
1
Install size
3.82 kB
Created

Readme

Source

isNumber

NPM

isNumber is a super tiny module that provides a test to see if a value is a finite number.

By super tiny, I mean like a single line -- however, I tend to use this somewhat frequently, so module it is!

var isNumber = require("isnumber")

isNumber(13) // true
isNumber("1241.12") // true
isNumber(0xff) // true

isNumber(Infinity) // false
isNumber("cat") // false
isNumber({foo: "bar"}) // false

LICENSE

MIT

Keywords

FAQs

Last updated on 14 Aug 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc