static getChildren(node) {
    var res = [];

    if (!childKeys[node.type]) {
      childKeys[node.type] = Object.keys(node).filter((key) => {
        return key !== 'loc' && typeof node[key] === 'object';
      });
    }

    // Ignore null values, as well as JSText nodes incorrectly generated
    // by babylon that contain only newlines and spaces
    var filterIgnored = (nodes) => nodes.filter(node => {
      return node && (node.type !== 'JSXText' || node.value.trim());
    });

    childKeys[node.type].forEach((key) => {
      var val = node[key];
      if (val && val.type) {
        res.push(val);
      } else if (val instanceof Array) {
        res = res.concat(filterIgnored(val));
      }
    });

    return res;
  }
Returns a given node's children as an array of nodes. Designed for use
with ESTree/Babylon spec ASTs.

@param   {Node}   The node for which to retrieve its children
@returns {Node[]} An array of child nodes