packages/building-webpack/dom5-fork/index.js
function treeMap(node, mapfn) {
  var results = [];
  nodeWalk(node, function(node) {
    results = results.concat(mapfn(node));
    return false;
  });
  return results;
}
function treeMap(node, mapfn) {
  var results = [];
  nodeWalk(node, function(node) {
    results = results.concat(mapfn(node));
    return false;
  });
  return results;
}
Applies `mapfn` to `node` and the tree below `node`, returning a flattened
list of results.