docs: function getDatasetDelta(a, b){
      if (!a || !a.itemCount)
      {
        if (b && b.itemCount)
          return {
            inserted: b.getItems()
          };
      }
      else
      {
        if (!b || !b.itemCount)
        {
          if (a.itemCount)
            return {
              deleted: a.getItems()
            };
        }
        else
        {
          var inserted = [];
          var deleted = [];
  
          for (var key in a.items_)
          {
            var item = a.items_[key];
            if (item.basisObjectId in b.items_ == false)
              deleted.push(item);
          }
  
          for (var key in b.items_)
          {
            var item = b.items_[key];
            if (item.basisObjectId in a.items_ == false)
              inserted.push(item);
          }
  
          return getDelta(inserted, deleted);
        }
      }
    }