lib/utils.js
function standardizeInput(input) {
  if ([undefined, null].indexOf(input) !== -1) {
    input = null;
  }
  else if (_.isNaN(input)) {
    input = null;
  }
  else if (_.isString(input)) {
    input = input.trim();

    // Written empty values
    if (["unspecified", "unknown", "none", "null", "empty", ""].indexOf(input.toLowerCase()) !== -1) {
      input = null;
    }
  }

  return input;
}
function standardizeInput(input) {
  if ([undefined, null].indexOf(input) !== -1) {
    input = null;
  }
  else if (_.isNaN(input)) {
    input = null;
  }
  else if (_.isString(input)) {
    input = input.trim();

    // Written empty values
    if (["unspecified", "unknown", "none", "null", "empty", ""].indexOf(input.toLowerCase()) !== -1) {
      input = null;
    }
  }

  return input;
}
function standardizeInput ( input ) { if ( [ undefined , null ] . indexOf ( input ) !== - 1 ) { input = null ; } else if ( _ . isNaN ( input ) ) { input = null ; } else if ( _ . isString ( input ) ) { input = input . trim ( ) ; // Written empty values if ( [ "unspecified" , "unknown" , "none" , "null" , "empty" , "" ] . indexOf ( input . toLowerCase ( ) ) !== - 1 ) { input = null ; } } return input ; }
Standardize input, like handling empty
Standardize input like handling empty