jspm_packages/npm/babel-core@5.8.38/lib/generation/generators/methods.js
function ArrowFunctionExpression(node, print) {
  if (node.async) this.push("async ");

  if (node.params.length === 1 && t.isIdentifier(node.params[0])) {
    print.plain(node.params[0]);
  } else {
    this._params(node, print);
  }

  this.push(" => ");

  var bodyNeedsParens = t.isObjectExpression(node.body);

  if (bodyNeedsParens) {
    this.push("(");
  }

  print.plain(node.body);

  if (bodyNeedsParens) {
    this.push(")");
  }
}
function ArrowFunctionExpression(node, print) {
  if (node.async) this.push("async ");

  if (node.params.length === 1 && t.isIdentifier(node.params[0])) {
    print.plain(node.params[0]);
  } else {
    this._params(node, print);
  }

  this.push(" => ");

  var bodyNeedsParens = t.isObjectExpression(node.body);

  if (bodyNeedsParens) {
    this.push("(");
  }

  print.plain(node.body);

  if (bodyNeedsParens) {
    this.push(")");
  }
}
function ArrowFunctionExpression ( node , print ) { if ( node . async ) this . push ( "async " ) ; if ( node . params . length === 1 && t . isIdentifier ( node . params [ 0 ] ) ) { print . plain ( node . params [ 0 ] ) ; } else { this . _params ( node , print ) ; } this . push ( " => " ) ; var bodyNeedsParens = t . isObjectExpression ( node . body ) ; if ( bodyNeedsParens ) { this . push ( "(" ) ; } print . plain ( node . body ) ; if ( bodyNeedsParens ) { this . push ( ")" ) ; } }
Prints ArrowFunctionExpression, prints params and body, handles async.
Leaves out parentheses when single param.
Prints ArrowFunctionExpression prints params and body handles async . Leaves out parentheses when single param .