code: function bare(node, parent, scope) {
    // has an `id` so we don't need to infer one
    if (node.id) return;
  
    var id;
    if (t.isProperty(parent) && parent.kind === "init" && (!parent.computed || t.isLiteral(parent.key))) {
      // { foo() {} };
      id = parent.key;
    } else if (t.isVariableDeclarator(parent)) {
      // var foo = function () {};
      id = parent.id;
  
      if (t.isIdentifier(id)) {
        var binding = scope.parent.getBinding(id.name);
        if (binding && binding.constant && scope.getBinding(id.name) === binding) {
          // always going to reference this method
          node.id = id;
          return;
        }
      }
    } else {
      return;
    }
  
    var name;
    if (t.isLiteral(id)) {
      name = id.value;
    } else if (t.isIdentifier(id)) {
      name = id.name;
    } else {
      return;
    }
  
    name = t.toBindingIdentifierName(name);
    id = t.identifier(name);
  
    var state = visit(node, name, scope);
    return wrap(state, node, id, scope);
  }
docs: [Please add a description.]