New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@primitive/is-finite

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@primitive/is-finite

Determine if a value is a finite `number`

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

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.

Keywords

assert

FAQs

Package last updated on 01 Dec 2017

Did you know?

Socket

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.

Install

Related posts