function nextPrime(number) {
  if (number < 2) { return 2; }
  let possiblePrime = isOdd(number) ? number + 2 : number + 1;

  while (!isPrime(possiblePrime)) {
    possiblePrime += 2;
  }
  return possiblePrime;
}
Find the next prime of a given number
Runtime: ? // the gap between prime numbers is not deterministic.
@param {integer} number