Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
es-env-aggressive-nan
Advanced tools
Tracking and getting rid of all NaNs!
WARNING! this will turn the ECMAScript environment you're running to a non-standard one. Your own code or some dependency code may break as a result.
This piece of code is meant to be used only during development, not in production. The goal is to throw as soon as NaN appears (instead of letting NaNs flow in other places of the program).
npm install es-env-aggressive-nan --save
Just require
it before anything else. Beware, this may break dependent packages. Use at your own risk!
require('es-env-aggressive-nan');
This script only wraps functions that may return NaN (and might take a NaN as argument). It does not cover finding when a variable is purposefully set to NaN (you do that at your own risk), nor syntactic patterns that result in NaN being generated like:
var i;
console.log(+i);
The wrapping may result in a minor performance hit that is deemed acceptable given it is only happening in development phase and not in production.
For now, this has only been tested and used on Node.js™ 0.10. It should work fine on 0.12 and io.js but in the unlikely case you run into problems, please file an issue.
The functions that are wrapped are:
Math
, Number
, Number.prototype
, Date
, Date.prototype
ISC
FAQs
Tracking and getting rid of all NaNs!
The npm package es-env-aggressive-nan receives a total of 2 weekly downloads. As such, es-env-aggressive-nan popularity was classified as not popular.
We found that es-env-aggressive-nan demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.