Socket
Socket
Sign inDemoInstall

is-numeric

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

5

is-numeric.js

@@ -5,3 +5,6 @@ (function(root) {

function isNumeric(v) {
return !isNaN(v);
if (typeof v === 'number') return true;
var s = v.toString();
if (!s) return false;
return !isNaN(s);
}

@@ -8,0 +11,0 @@

2

package.json
{
"name": "is-numeric",
"version": "0.0.1",
"version": "0.0.2",
"description": "Predicate that returns true for numeric values.",

@@ -5,0 +5,0 @@ "main": "is-numeric.js",

@@ -45,2 +45,9 @@ # is-numeric

console.log(isNumeric('10px')); // false
console.log(isNumeric('*')); // false
console.log(isNumeric('')); // false
console.log(isNumeric(true)); // false
console.log(isNumeric(false)); // false
console.log(isNumeric([])); // false
console.log(isNumeric(function(){})); // false
console.log(isNumeric({})); // false
```

@@ -47,0 +54,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc