prod/service-worker-28ddbc7ef7a575da0539a0f05f4bfdae.js
function readBlobData(body, type, asBlob, callback) {
  if (asBlob) {
    if (!body) {
      callback(pouchdbBinaryUtils.blob([''], {type: type}));
    } else if (typeof body !== 'string') { // we have blob support
      callback(body);
    } else { // no blob support
      callback(pouchdbBinaryUtils.base64StringToBlobOrBuffer(body, type));
    }
  } else { // as base64 string
    if (!body) {
      callback('');
    } else if (typeof body !== 'string') { // we have blob support
      pouchdbBinaryUtils.readAsBinaryString(body, function (binary) {
        callback(pouchdbBinaryUtils.btoa(binary));
      });
    } else { // no blob support
      callback(body);
    }
  }
}
function readBlobData(body, type, asBlob, callback) {
  if (asBlob) {
    if (!body) {
      callback(pouchdbBinaryUtils.blob([''], {type: type}));
    } else if (typeof body !== 'string') { // we have blob support
      callback(body);
    } else { // no blob support
      callback(pouchdbBinaryUtils.base64StringToBlobOrBuffer(body, type));
    }
  } else { // as base64 string
    if (!body) {
      callback('');
    } else if (typeof body !== 'string') { // we have blob support
      pouchdbBinaryUtils.readAsBinaryString(body, function (binary) {
        callback(pouchdbBinaryUtils.btoa(binary));
      });
    } else { // no blob support
      callback(body);
    }
  }
}
function readBlobData ( body , type , asBlob , callback ) { if ( asBlob ) { if ( ! body ) { callback ( pouchdbBinaryUtils . blob ( [ '' ] , { type : type } ) ) ; } else if ( typeof body !== 'string' ) { // we have blob support callback ( body ) ; } else { // no blob support callback ( pouchdbBinaryUtils . base64StringToBlobOrBuffer ( body , type ) ) ; } } else { // as base64 string if ( ! body ) { callback ( '' ) ; } else if ( typeof body !== 'string' ) { // we have blob support pouchdbBinaryUtils . readAsBinaryString ( body , function ( binary ) { callback ( pouchdbBinaryUtils . btoa ( binary ) ) ; } ) ; } else { // no blob support callback ( body ) ; } } }
Read a blob from the database, encoding as necessary and translating from base64 if the IDB doesn't support native Blobs
Read a blob from the database encoding as necessary and translating from base64 if the IDB doesn t support native Blobs