device/index.js
function _trimOfflinePublishQueueIfNecessary() {
      var rc = true;

      if ((offlineQueueMaxSize > 0) &&
         (offlinePublishQueue.length >= offlineQueueMaxSize)) {
         //
         // The queue has reached its maximum size, trim it
         // according to the defined drop behavior.
         //
         if (offlineQueueDropBehavior === 'oldest') {
            offlinePublishQueue.shift();
         } else {
            rc = false;
         }
      }
      return rc;
   }
function _trimOfflinePublishQueueIfNecessary() {
      var rc = true;

      if ((offlineQueueMaxSize > 0) &&
         (offlinePublishQueue.length >= offlineQueueMaxSize)) {
         //
         // The queue has reached its maximum size, trim it
         // according to the defined drop behavior.
         //
         if (offlineQueueDropBehavior === 'oldest') {
            offlinePublishQueue.shift();
         } else {
            rc = false;
         }
      }
      return rc;
   }
function _trimOfflinePublishQueueIfNecessary ( ) { var rc = true ; if ( ( offlineQueueMaxSize > 0 ) && ( offlinePublishQueue . length >= offlineQueueMaxSize ) ) { // // The queue has reached its maximum size, trim it // according to the defined drop behavior. // if ( offlineQueueDropBehavior === 'oldest' ) { offlinePublishQueue . shift ( ) ; } else { rc = false ; } } return rc ; }
Trim the offline queue if required; returns true if another element can be placed in the queue
Trim the offline queue if required ; returns true if another element can be placed in the queue