'use strict'

var isInteger = require('is-integer')

module.exports = function parseIntStrict (int) {
  if (typeof int === 'number') {
    return isInteger(int) ? int : undefined
  }
  if (typeof int === 'string') {
    return /^\d+$/.test(int) ? parseInt(int, 10) : undefined
  }
}

'use strict'

var isInteger = require('is-integer')

module.exports = function parseIntStrict (integer) {
  if (typeof integer === 'number') {
    return isInteger(integer) ? integer : undefined
  }
  if (typeof integer === 'string') {
    return /^\d+$/.test(integer) ? parseInt(integer, 10) : undefined
  }
}

Replace "int" variable name with "integer"
Replace "int" variable name with "integer"

Some compilers break because int is a reserved (unused) word in JS

Closes #1, Closes #2
