code: function randomCallback() {
  
    if (!randomQueue.length) {
      self.postMessage({ event: 'request-seed', amount: MAX_SIZE_RANDOM_BUFFER });
    }
  
    return new Promise(function(resolve) {
      randomQueue.push(resolve);
    });
  }
docs: Handle random buffer exhaustion by requesting more random bytes from the main window
  @returns {Promise<Object>}  Empty promise whose resolution indicates that the buffer has been refilled