function isClassAttribute(node, classRegex) {
  if (!node.name) {
    return false;
  }
  let name = '';
  switch (node.type) {
    case 'TextAttribute':
      name = node.name;
      break;
    case 'JSXAttribute':
      if (node.name.type === 'JSXNamespacedName') {
        const ns = node.name.namespace.name || '';
        name = (ns.length ? ns + ':' : '') + node.name.name.name;
      } else {
        name = node.name.name;
      }
      break;
    default:
      name = node.name.name;
  }
  return new RegExp(classRegex).test(name);
}
Find out if node is `class` or `className`

@param {ASTNode} node The AST node being checked
@param {String} classRegex Regex to test the attribute that is being checked against
@returns {Boolean}