Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

types.js

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

types.js - npm Package Compare versions

Comparing version 1.3.2 to 1.3.3

typesCompact.coffee

2

package.json
{
"name": "types.js",
"version": "1.3.2",
"version": "1.3.3",
"description": "A tiny (1.7kb), but essential Javascript type-check library",

@@ -5,0 +5,0 @@ "main": "types.min.js",

@@ -10,6 +10,2 @@ types.js

Standard Javascript `(NaN == NaN) == false` still freakes me out, it's so wrong..<br/>
You cannot add to `NaN`, that's logical. But if `(typof NaN == 'number')` how can we know if our value is a number?<br/>
Well: `(value == value)`, because `(NaN != NaN)`, omg! I refuse to have this in my code, except for this library!
With types.js:

@@ -34,2 +30,3 @@ ```javascript

}
// check if parseInt returned NaN..
if ( left !== left || typeof left !== 'number' )

@@ -36,0 +33,0 @@ left= 100;

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc