function object(expression) {
	while (expression.type === 'MemberExpression') {
		expression = /** @type {ESTree.MemberExpression | ESTree.Identifier} */ (expression.object);
	}

	if (expression.type !== 'Identifier') {
		return null;
	}

	return expression;
}
Gets the left-most identifier of a member expression or identifier.
@param {ESTree.MemberExpression | ESTree.Identifier} expression
@returns {ESTree.Identifier | null}