lib/types.js
function getClassName(typeName) {
  if (typeName === 'error') {
    typeName = 'record';
  } else {
    var match = /^([^:]+):(.*)$/.exec(typeName);
    if (match) {
      if (match[1] === 'union') {
        typeName = match[2] + 'Union';
      } else {
        // Logical type.
        typeName = match[1];
      }
    }
  }
  return utils.capitalize(typeName) + 'Type';
}
function getClassName(typeName) {
  if (typeName === 'error') {
    typeName = 'record';
  } else {
    var match = /^([^:]+):(.*)$/.exec(typeName);
    if (match) {
      if (match[1] === 'union') {
        typeName = match[2] + 'Union';
      } else {
        // Logical type.
        typeName = match[1];
      }
    }
  }
  return utils.capitalize(typeName) + 'Type';
}
function getClassName ( typeName ) { if ( typeName === 'error' ) { typeName = 'record' ; } else { var match = / ^([^:]+):(.*)$ / . exec ( typeName ) ; if ( match ) { if ( match [ 1 ] === 'union' ) { typeName = match [ 2 ] + 'Union' ; } else { // Logical type. typeName = match [ 1 ] ; } } } return utils . capitalize ( typeName ) + 'Type' ; }
Return a type's class name from its Avro type name.

We can't simply use `constructor.name` since it isn't supported in all
browsers.

@param typeName {String} Type name.
Return a type s class name from its Avro type name .