JSPM

find-in-pi

3.1.6
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10
  • Score
    100M100P100Q35209F
  • License BSD

Find where a number is located in Pi

Package Exports

  • find-in-pi

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 (find-in-pi) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Find in Pi

A small library that returns the location (index) of a number in the first ~1.5m decimal digits of Pi. Supported commands:

  • .findInPi(<number>) (returns index of number, starting counting after the decimal. i.e. for n=1 returns 1)
  • .getPi() (returns, as String the Pi series used for any search)

Installation

npm install find-in-pi

Usage

var fip = require('find-in-pi');

var numIndex = fip.findInPi(1900);

Output should be 4791

Tests

npm test

Contributing

...is welcome :)