Skip to content

A simple npm package with a function that returns the nth prime number

License

Notifications You must be signed in to change notification settings

edgarpf/nth-prime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nth-prime Build Status codecov Maintainability

A simple npm package with a function that returns the nth prime number.

Installation

npm i -S nth-prime

Usage

var nthPrime = require('nth-prime');

console.log(nthPrime(1)); // prints 2
console.log(nthPrime(2)); // prints 3
console.log(nthPrime(5)); // prints 11
console.log(nthPrime(1000000));  // prints 15485863

About

A simple npm package with a function that returns the nth prime number

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published