visitors.js
function renderExpressionMemoized(expr, traverse, path, state) {
  var evaluated;
  if (expr.type === Syntax.Identifier) {
    evaluated = expr.name;
  } else if (isString(expr)) {
    evaluated = expr;
  } else {
    evaluated = genID('var');
    utils.append(evaluated + ' = ', state);
    render(expr, traverse, path, state);

    utils.append(', ', state);
  }
  return evaluated;
}
function renderExpressionMemoized(expr, traverse, path, state) {
  var evaluated;
  if (expr.type === Syntax.Identifier) {
    evaluated = expr.name;
  } else if (isString(expr)) {
    evaluated = expr;
  } else {
    evaluated = genID('var');
    utils.append(evaluated + ' = ', state);
    render(expr, traverse, path, state);

    utils.append(', ', state);
  }
  return evaluated;
}
function renderExpressionMemoized ( expr , traverse , path , state ) { var evaluated ; if ( expr . type === Syntax . Identifier ) { evaluated = expr . name ; } else if ( isString ( expr ) ) { evaluated = expr ; } else { evaluated = genID ( 'var' ) ; utils . append ( evaluated + ' = ' , state ) ; render ( expr , traverse , path , state ) ; utils . append ( ', ' , state ) ; } return evaluated ; }
Render expression into a variable declaration and return its id.

If we destructure is an identifier (or a string) we use its "value"
directly, otherwise we cache it in variable declaration to prevent extra
"effectful" evaluations.

@param {Node|String|Array} expr Expression to render
@param {Function} traverse
@param {Object} path
@param {Object} state
Render expression into a variable declaration and return its id .