Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
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 7,961,798 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
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.