keyPath || "";
      return p;
    }, {}));

    const options = keyPrefix ?
      {
        numRowsPerChunk: 2,
        prettyJson: true,
        filter: filterFn,
        progressCallback
      } :
      {
        numRowsPerChunk: 2,
        prettyJson: true,
        progressCallback
      };

    addInfo('Downloading from ' + dbName);
    const blob = await db.export(options);
    addInfo('Database export complete... starting download...');
    var a = document.createElement("a");
    document.body.appen