nl_tokens: Compare two different cart objects and get the messages of newest one
pl_tokens: function getNewMessages ( previousCartValue , nextCartValue ) { previousCartValue = previousCartValue || { } ; nextCartValue = nextCartValue || { } ; const nextCartMessages = nextCartValue . messages || [ ] ; // If there is no previous cart then just return the messages for the new cart if ( ! previousCartValue || ! previousCartValue . client_metadata || ! nextCartValue . client_metadata ) { return nextCartMessages ; } const previousDate = previousCartValue . client_metadata . last_server_response_date ; const nextDate = nextCartValue . client_metadata . last_server_response_date ; const hasNewServerData = i18n . moment ( nextDate ) . isAfter ( previousDate ) ; <mask> hasNewServerData ? nextCartMessages : [ ] ; }