code: function CommandCursor(cursor) {
      this.toArray = function (callback) {
        if (typeof callback !== 'function') {
          return new Promise(function(resolve,reject) {
            callback = function(err, items) {
              if (err) {
                return reject(err);
              }
              resolve(items);
            }
            cursor.toArray(getListCollectionsHandler(self, params, callback));
          });       
        }
  
        cursor.toArray(getListCollectionsHandler(self, params, callback));
      };
    }
docs: MongoDB `CommandCursor` like object