index.js
/**
* Verify if a given value is not inferior to another given value.
* Both values will be treated as strings.
*
* @public
* @since 0.1.0
* @param {!Number|String} value - The value to be validated.
* @param {!Number|String} minValue - The minimum allowed for the given value.
* @return {Boolean}
*
* @example
* var isValueGreaterThanZero = defy.min(5, 0)
*/
Verify if a given value is not inferior to another given value.
Both values will be treated as strings.
Verify if a given value is not inferior to another given value . Both values will be treated as strings .
function min (value, minValue) {
  let val = value
  let minVal = minValue
  if (normalizeValue(val).length !== normalizeValue(minVal).length) {
    if (number(val)) {
      val = parseFloat(val)
    }
    if (number(minVal)) {
      minVal = parseFloat(minVal)
    }
  }
  if (val < minVal) {
    return false
  }
  return true
}
function min ( value , minValue ) { let val = value let minVal = minValue if ( normalizeValue ( val ) . length !== normalizeValue ( minVal ) . length ) { if ( number ( val ) ) { val = parseFloat ( val ) } if ( number ( minVal ) ) { minVal = parseFloat ( minVal ) } } if ( val < minVal ) { return false } return true }
Verify if a given value is not inferior to another given value.
Verify if a given value is not inferior to another given value .