1.0.0 • Published 6 years ago

@typeforce/nan v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

nan

NPM NPM CDN LICENSE

A constant value representing NaN (not-a-number).

Usage

    npm install @typeforce/nan --save   # Install package via NPM
    import { expect } from "chai";
    import nan from "@typeforce/nan";

    // The constant can be accessed directly:
    expect(nan.nan).to.be.NaN;

    // Or it can be calculated:
    expect(nan.calculate()).to.be.NaN;

This package contains TypeScript type declarations.

Content Delivery Network (CDN)

This package can be imported via unpkg as demonstrated below.

    <script src="https://unpkg.com/@typeforce/nan/dist/index.min.js"></script>
    <script type="application/javascript">
        if (Number.isNaN(NAN)) {
            // Yay!
        }
    </script>

Build & Test

This package uses Gulp for building, and Chai and Mocha for testing.

    npm install     # Installs dependencies.
    npm run build   # Build the project.
    npm test        # Run tests.

License

Refer to the LICENSE file for license information.