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

stringify-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

stringify-pi

Stringify number values that might be multiples of π

latest
Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
939
13.82%
Maintainers
1
Weekly downloads
 
Created
Source

stringify-pi

Stringify number values that might be multiples of π.

Build Status Coverage Status Code Climate Dependency Status devDependency Status

NPM

Usage

var stringifyPi = require('stringify-pi');
var π = Math.PI;

stringifyPi(3 / π);
//=> '3/π'

stringifyPi(π / 3);
//=> 'π/3'

stringifyPi(2 * π / 3);
//=> '2π/3'

stringifyPi(2 * π);
//=> '2π'

// works on normal fractions too
stringifyPi(2/3);
//=> '2/3'

API

stringifyPi(input)

input

Required Type: number

A number that might be a (fractional) multiple of π.

returns

A String representation of the input. If a reasonable estimation of a fractional value or fractional multiple of π can be found, the string will contain the π character.

License

MIT © James Talmage

FAQs

Package last updated on 13 Sep 2015

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