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

@constants/pi

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@constants/pi

A numeric constant equal to an approximation of pi

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

pi

NPM NPM CDN LICENSE

The closest approximation to the numeric constant 'pi', the ratio of a circle's circumference to its diameter.

Usage

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

    // The constant can be accessed directly:
    expect(pi.pi).to.be.approximately(Math.PI, 1e-8);

    // Or it can be calculated:
    expect(pi.calculate()).to.be.approximately(Math.PI, 1e-8);

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/@primitive/is-array/dist/index.min.js">
    <script type="application/javascript">
        var x = Math.PI;
        if (x === pi) {
            // 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.

Keywords

constant

FAQs

Package last updated on 01 Feb 2018

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