# es-env-aggressive-nan

> Tracking and getting rid of all NaNs!

Latest version **1.0.0** (published 2015-03-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install es-env-aggressive-nan
pnpm add es-env-aggressive-nan
yarn add es-env-aggressive-nan
bun add es-env-aggressive-nan
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-03-08 |
| First published | 2015-03-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | David Bruant |
| Maintainers | davidbruant |
| Keywords | es-env, ECMAScript, NaN, errors, Math |

## Links

- npm: https://www.npmjs.com/package/es-env-aggressive-nan
- Repository: https://github.com/DavidBruant/es-env-aggressive-nan
- Issues: https://github.com/DavidBruant/es-env-aggressive-nan/issues
- npm.io page: https://npm.io/package/es-env-aggressive-nan

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-03-08

## README

# es-env-aggressive-nan

 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).


## Install

````sh
npm install es-env-aggressive-nan --save
````


## How to use it

Just `require` it before anything else. Beware, this may break dependent packages. Use at your own risk!

````sh
require('es-env-aggressive-nan');
````


## Limitations

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:

```js
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](https://iojs.org/) but in the unlikely case you run into problems, please file an [issue](https://github.com/DavidBruant/es-env-remove-footguns/issues).


## Changes

The functions that are wrapped are:
* own properties of `Math`, `Number`, `Number.prototype`, `Date`, `Date.prototype`
* parseInt
* parseFloat
* Number
* Date
* String.prototype.charCodeAt

## Licence

ISC

---
_Source: https://npm.io/package/es-env-aggressive-nan · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
