https://github.com/fabiospampinato/crypto-prime-test
A function that deterministically checks if a number is prime.
https://github.com/fabiospampinato/crypto-prime-test
check number prime test
Last synced: 7 days ago
JSON representation
A function that deterministically checks if a number is prime.
- Host: GitHub
- URL: https://github.com/fabiospampinato/crypto-prime-test
- Owner: fabiospampinato
- License: mit
- Created: 2023-08-05T18:29:03.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-01-15T01:44:14.000Z (9 months ago)
- Last Synced: 2025-01-15T03:07:08.859Z (9 months ago)
- Topics: check, number, prime, test
- Language: TypeScript
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# Crypto Prime Test
A function that deterministically checks if a number is prime.
## Install
```sh
npm install crypto-prime-test
```## Usage
```ts
import isPrime from 'crypto-prime-test';// Let's check if a number is prime for sure, deterministically
isPrime ( 465207927154668043n ); // => true
isPrime ( 465207927154668041n ); // => false
```## License
MIT © Fabio Spampinato