
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
lodash.isnumber
Advanced tools
The lodash.isnumber package is a utility function that checks if a given value is classified as a number primitive or object. It is part of the Lodash library, which is a popular utility library for JavaScript.
Check if a value is a number
This feature allows you to check if a given value is a number. It returns true for number primitives and objects, including NaN, and false for non-number values.
const isNumber = require('lodash.isnumber');
console.log(isNumber(123)); // true
console.log(isNumber('123')); // false
console.log(isNumber(NaN)); // true
The is-number package is a simple utility that checks if a value is a number. It is similar to lodash.isnumber but is a standalone package without the additional utilities provided by Lodash. It also returns true for number primitives and objects, including NaN.
The number-is-nan package is a utility that specifically checks if a value is NaN. While it is more specialized than lodash.isnumber, it can be useful in scenarios where you need to specifically identify NaN values.
The is-numeric package checks if a value is numeric, which includes both number primitives and numeric strings. This is slightly different from lodash.isnumber, which does not consider numeric strings as numbers.
The lodash method _.isNumber
exported as a Node.js module.
Using npm:
$ {sudo -H} npm i -g npm
$ npm i --save lodash.isnumber
In Node.js:
var isNumber = require('lodash.isnumber');
See the documentation or package source for more details.
FAQs
The lodash method `_.isNumber` exported as a module.
The npm package lodash.isnumber receives a total of 11,083,548 weekly downloads. As such, lodash.isnumber popularity was classified as popular.
We found that lodash.isnumber demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
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.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.