code: function str2num(type) {
    switch (String(type)) {
      case 'byte':
        return types.BYTE;
      case 'char':
        return types.CHAR;
      case 'short':
        return types.SHORT;
      case 'int':
        return types.INT;
      case 'float':
        return types.FLOAT;
      case 'double':
        return types.DOUBLE;
        /* istanbul ignore next */
      default:
        return -1;
    }
  }
docs: Reverse search of num2str
  @ignore
  @param {string} type - string that represents the type
  @return {number} - parsed value of the type