Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 10, 2024 via pnpm

is-number 7.0.0

Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.
Package summary
Share
0
issues
1
license
1
MIT
Package created
22 Sep 2014
Version published
4 Jul 2018
Maintainers
3
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
is-number@7.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of is-number 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does is-number do?

The JavaScript utility package is-number provides a quick and robust check to determine if a number or a string value could be interpreted as a finite number. It's especially useful for handling and validating user inputs, regex matches, and other situations where a value might be a number in the context of your JavaScript code. Its discerning computation gives an extra layer of reliability and prevents possible bugs introduced by JavaScript's weak typing and implicit coercion behaviors, especially with edge cases.

How do you use is-number?

To start using is-number in your JavaScript project, you first need to install it using npm, the default package manager for the Node.js JavaScript runtime. Initiate the console and execute the command npm install --save is-number, which downloads the package and saves it as a dependency in your project.

Upon successful installation, you can import the function isNumber into your code by declaring the statement const isNumber = require('is-number');

To utilize isNumber, simply call it with the value you wish to check as the argument, like so: isNumber(value).

Here are some sample use-cases:

const isNumber = require('is-number');

console.log(isNumber(5e3));  // Outputs: true

console.log(isNumber('012'));  // Outputs: true

console.log(isNumber(NaN));  // Outputs: false

console.log(isNumber('foo'));  // Outputs: false

Where are the is-number docs?

You can find the detailed documentation of is-number directly on its official GitHub repository at https://github.com/jonschlinkert/is-number. The README.md file in the repository includes a comprehensive description, usage examples, performance benchmarks, and other relevant information about the package. If you're interested in contributing to the project or want to run the unit tests locally, you'll also find instructions in the README. Learn more about is-number and get involved with its development on GitHub!