function determineType(information) {
  let type;
  let multiple = false;
  let required = true;

  for (const value of information) {
    if (value === null || value === undefined) {
      required = false;
      continue;
    }

    if (value.type === 'string') {
      type = 'string';
    } else if (value.type === 'float') {
      if (type !== 'string') {
        type = 'float';
      }
    } else if (value.type === 'integer') {
      if (type !== 'float' && type !== 'string') {
        type = 'integer';
      }
    }

    if (value.multiple === true) {
      multiple = true;
    }
  }

  return {
    type,
    multiple,
    required,
  };
}
// Given a array of type information, determines the type which encompases all values
Given a array of type information, determines the type which encompases all values
Given a array of type information determines the type which encompases all values
function determineType(information) {
  let type;
  let multiple = false;
  let required = true;
  for (const value of information) {
    if (value === null || value === undefined) {
      required = false;
      continue;
    }
    if (value.type === 'string') {
      type = 'string';
    } else if (value.type === 'float') {
      if (type !== 'string') {
        type = 'float';
      }
    } else if (value.type === 'integer') {
      if (type !== 'float' && type !== 'string') {
        type = 'integer';
      }
    }
    if (value.multiple === true) {
      multiple = true;
    }
  }
  return {
    type,
    multiple,
    required,
  };
}
function determineType ( information ) { let type ; let multiple = false ; let required = true ; for ( const value of information ) { if ( value === null || value === undefined ) { required = false ; continue ; } if ( value . type === 'string' ) { type = 'string' ; } else if ( value . type === 'float' ) { if ( type !== 'string' ) { type = 'float' ; } } else if ( value . type === 'integer' ) { if ( type !== 'float' && type !== 'string' ) { type = 'integer' ; } } if ( value . multiple === true ) { multiple = true ; } } return { type , multiple , required , } ; }
Given a array of type information, determines the type which encompases all values
Given a array of type information determines the type which encompases all values