@@ -3,15 +3,19 @@ primeupto is an math library for JavaScript and Node.js. It help you to find all
33
44[ ![ Version] ( https://img.shields.io/npm/v/primeupto )] ( https://www.npmjs.com/package/primeupto )
55[ ![ license] ( https://img.shields.io/npm/l/primeupto )] ( https://www.npmjs.com/package/primeupto )
6+ [ ![ download] ( https://img.shields.io/npm/dw/primeupto )] ( https://www.npmjs.com/package/primeupto )
7+ [ ![ download] ( https://img.shields.io/npm/dt/primeupto )] ( https://www.npmjs.com/package/primeupto )
68[ ![ Fork] ( https://img.shields.io/github/forks/letskhabar/primeupto?label=fork&style=social )] ( https://github.com/letskhabar/primeupto/fork )
79[ ![ Star] ( https://img.shields.io/github/stars/letskhabar/primeupto?style=social )] ( https://github.com/letskhabar/primeupto/stargazers )
810[ ![ watch] ( https://img.shields.io/github/watchers/letskhabar/primeupto?style=social )] ( https://github.com/letskhabar/primeupto/watchers )
911
1012
1113## Features
1214
13- - find prime number from 2 to n.
14- - find prime number from m to n. // comming soon
15+ - find all prime number upto n.
16+ - find all prime number from m to n. // comming soon
17+ - find number of prime upto n.
18+ - find number of prime from m to n.
1519- Can be used in command line as well.
1620- Runs on any JavaScript engine.
1721- Is easily extensible.
@@ -27,15 +31,25 @@ Install primeupto using [npm](https://www.npmjs.com/package/primeupto):
2731
2832
2933``` js
30- const {primeupto } = require (' primeupto' );
34+ const {primeupto , primelength } = require (' primeupto' );
3135
3236console .log (primeupto (5 )); // 2,3,5
37+ console .log (primelength (5 )); // 3
3338console .log (primeupto (34 )); // 2,3,5,7,11,13,17,19,23,29,31
39+ console .log (primelength (34 )); // 11
3440console .log (primeupto (25 )); // 2,3,5,7,11,13,17,19,23
41+ console .log (primelength (25 )); // 9
3542console .log (primeupto (53 )); // 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53
43+ console .log (primelength (53 )); // 16
3644
3745```
3846
47+ ## Run
48+
49+ ```
50+ npm test
51+ ```
52+
3953See the [ Getting Started] ( https://github.com/letskhabar/primeupto ) for a more detailed tutorial.
4054
4155
0 commit comments