function createBlobBuffer(data, type) {
    var blobBuffer;

    if (_util.isElectronRenderer) {
      // if we are inside of electron-renderer, always use the node-buffer
      return Buffer.from(data, {
        type: type
      });
    }

    try {
      // for browsers
      blobBuffer = new Blob([data], {
        type: type
      });
    } catch (e) {
      // for node
      blobBuffer = Buffer.from(data, {
        type: type
      });
    }

    return blobBuffer;
  }
/**
   * depending if we are on node or browser,
   * we have to use Buffer(node) or Blob(browser)
   */
depending if we are on node or browser,
we have to use Buffer(node) or Blob(browser)
depending if we are on node or browser we have to use Buffer ( node ) or Blob ( browser )
function createBlobBuffer(data, type) {
    var blobBuffer;
    if (_util.isElectronRenderer) {
      return Buffer.from(data, {
        type: type
      });
    }
    try {
      blobBuffer = new Blob([data], {
        type: type
      });
    } catch (e) {
      blobBuffer = Buffer.from(data, {
        type: type
      });
    }
    return blobBuffer;
  }
function createBlobBuffer ( data , type ) { var blobBuffer ; if ( _util . isElectronRenderer ) { return Buffer . from ( data , { type : type } ) ; } try { blobBuffer = new Blob ( [ data ] , { type : type } ) ; } catch ( e ) { blobBuffer = Buffer . from ( data , { type : type } ) ; } return blobBuffer ; }
depending if we are on node or browser,
 we have to use Buffer(node) or Blob(browser)
depending if we are on node or browser we have to use Buffer ( node ) or Blob ( browser )
// if we are inside of electron-renderer, always use the node-buffer // for browsers // for node