function getClassConstructor(classNode) {
  // Example class node: {
  //   type: 'ClassExpression',
  //   body: {
  //     type: 'ClassBody',
  //     body: [ MethodDefinition, ... ],
  //   }
  // }
  //
  // Example method node: {
  //   type: 'MethodDefinition',
  //   key: { type: 'Identifier', name: 'constructor' },
  //   value: {
  //     type: 'FunctionExpression',
  //     params: [ [Identifier], [Identifier], [Identifier] ],
  //     body: { type: 'BlockStatement', body: [Array] },
  // }

  assert.equal(classNode.type, 'ClassExpression');

  for (const member of classNode.body.body) {
    if (member.type == 'MethodDefinition' && member.key.name == 'constructor') {
      return member.value;
    }
  }

  return null;
}
Find the constructor of an ES6 class, if it exists.

@param {ASTNode} classNode
@return {ASTNode}