lib/common.js
function coercePositiveInteger(n) {
  n = +n || 0;
  if (n < 0 || !isNumber(n) || !isFinite(n)) {
    throw new RangeError('Invalid number');
  }
  return trunc(n);
}
function coercePositiveInteger(n) {
  n = +n || 0;
  if (n < 0 || !isNumber(n) || !isFinite(n)) {
    throw new RangeError('Invalid number');
  }
  return trunc(n);
}
function coercePositiveInteger ( n ) { n = + n || 0 ; if ( n < 0 || ! isNumber ( n ) || ! isFinite ( n ) ) { throw new RangeError ( 'Invalid number' ) ; } return trunc ( n ) ; }
Coerces an object to a positive integer. Does not allow Infinity.
Coerces an object to a positive integer . Does not allow Infinity .