All files / react-native-dropdownalert functions.js

100% Statements 8/8
100% Branches 11/11
100% Functions 1/1
100% Lines 8/8
1 2 3 4 5 6 7 8 9 10 11 122x 10x 1x 1x   9x 2x 2x   7x    
module.exports.validateType = function(type) {
  if (type.length === 0 || type === null) {
    console.warn('Missing DropdownAlert type. Available types: info, warn, error or custom');
    return false;
  }
  if (type != 'info' && type != 'warn' && type != 'error' && type != 'custom' && type != 'success') {
    console.warn('Invalid DropdownAlert type. Available types: info, warn, error, success, or custom');
    return false;
  }
  return true;
};