8000 just/packages/number-is-prime at test · hmmhmmhm/just · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
 
 

number-is-prime

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

just-is-prime

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

Try it now

  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
*/
0