import * as t from "@babel/types" ; export function getLeftMostMemberExpression ( memberExpression ) { const object = memberExpression . object ; if ( t . isMemberExpression ( object ) ) { return getLeftMostMemberExpression ( object ) ; } return memberExpression ; }