primality

A JavaScript library for prime numbers.

primality.js

Primality is a JavaScript library for prime numbers.

  • Check primality of a number
  • Less than 500 bytes minified
  • AMD support
  • Support for almost every browser and JavaScript runtime.

In browsers:

<script src="primality.js"></script>