function inferName (ast) {
  var inferredName;

  ast.children.some(function (node) {
    if (node.type == 'heading' && node.depth == 1) {
      inferredName = mdastToString(node);
      return true;
    }
  });

  return inferredName;
}
/**
 * Infer name from the top-level heading.
 */
Infer name from the top-level heading.
Infer name from the top - level heading .
function inferName (ast) {
  var inferredName;
  ast.children.some(function (node) {
    if (node.type == 'heading' && node.depth == 1) {
      inferredName = mdastToString(node);
      return true;
    }
  });
  return inferredName;
}
function inferName ( ast ) { var inferredName ; ast . children . some ( function ( node ) { if ( node . type == 'heading' && node . depth == 1 ) { inferredName = mdastToString ( node ) ; return true ; } } ) ; return inferredName ; }
Infer name from the top-level heading.
Infer name from the top - level heading .