JSPM

@primitive/is-finite

1.0.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 2
    • Score
      100M100P100Q38431F
    • License MIT

    Determine if a value is a finite `number`

    Package Exports

    • @primitive/is-finite

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@primitive/is-finite) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    is-finite

    Determine whether a JavaScript value is a finite number.

    Usage

        import { expect } from "chai";
        import isFinite from "@primitive/is-finite";
    
        expect(isFinite(42)).to.be.true;
        expect(isFinite(Number("1000"))).to.be.true;
    
        expect(isFinite(undefined)).to.be.false;
        expect(isFinite(null)).to.be.false;
        expect(isFinite(Number.POSITIVE_INFINITY)).to.be.false;
        expect(isFinite(Number.NEGATIVE_INFINITY)).to.be.false;
        expect(isFinite(1 / 0))to.be.false;
        expect(isFinite(0 / 0)).to.be.false;

    Build & Test

    This package uses Gulp for build automation, and Chai and Mocha for testing.

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

    License

    See the LICENSE file for license information.