packages/idyll-ast/src/index.js
function walkNodesBreadthFirstHelper(ast, f) {
  let childAst = [];
  (ast || []).forEach(node => {
    f(node);
    childAst = childAst.concat(getChildren(node));
  });
  if (childAst.length > 0) {
    walkNodesBreadthFirstHelper(childAst, f);
  }
}
function walkNodesBreadthFirstHelper(ast, f) {
  let childAst = [];
  (ast || []).forEach(node => {
    f(node);
    childAst = childAst.concat(getChildren(node));
  });
  if (childAst.length > 0) {
    walkNodesBreadthFirstHelper(childAst, f);
  }
}
function walkNodesBreadthFirstHelper ( ast , f ) { let childAst = [ ] ; ( ast || [ ] ) . forEach ( node => { f ( node ) ; childAst = childAst . concat ( getChildren ( node ) ) ; } ) ; if ( childAst . length > 0 ) { walkNodesBreadthFirstHelper ( childAst , f ) ; } }
Helper function for walkNodeBreadthFirst
Helper function for walkNodeBreadthFirst