README
just-is-prime
Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.
npm install just-is-prime
yarn add just-is-prime
Check if number is prime
import isPrime from 'just-is-prime;
/*
isPrime(1); // false
isPrime(2); // true
isPrime(17); // true
isPrime(10); // false
isPrime(); // throws
isPrime(null); // throws
isPrime("js"); // throws
isPrime({}); // throws
isPrime(function() {}); // throws
isPrime([]); // throws
*/