isInteger.js 210 B

123456789101112
  1. var isNumber = require('./isNumber');
  2. /**
  3. * Check if value is an integer
  4. */
  5. function isInteger(val){
  6. return isNumber(val) && (val % 1 === 0);
  7. }
  8. module.exports = isInteger;