lib/validator.js
function INTEGER_VALIDATOR(v) {
  v = (v || '').toString()

  if (v.match(/^[-+]?\d+$/)) {
    return {value: parseInt(v, 10)}
  }

  return {
    value: null,
    reason: function reason(k, v, result) {
      return 'ERROR: property value `' + v + '` is not supported for `' + util.camelCaseToHyphened(k) + '` (only integer is supported)'
    }
  }
}
function INTEGER_VALIDATOR(v) {
  v = (v || '').toString()

  if (v.match(/^[-+]?\d+$/)) {
    return {value: parseInt(v, 10)}
  }

  return {
    value: null,
    reason: function reason(k, v, result) {
      return 'ERROR: property value `' + v + '` is not supported for `' + util.camelCaseToHyphened(k) + '` (only integer is supported)'
    }
  }
}
function INTEGER_VALIDATOR ( v ) { v = ( v || '' ) . toString ( ) if ( v . match ( / ^[-+]?\d+$ / ) ) { return { value : parseInt ( v , 10 ) } } return { value : null , reason : function reason ( k , v , result ) { return 'ERROR: property value `' + v + '` is not supported for `' + util . camelCaseToHyphened ( k ) + '` (only integer is supported)' } } }
only integer value is valid

@param {string} v
@return {function} a function to return
- value: number|null
- reason(k, v, result)
only integer value is valid