function PromiseThrottle (options) {
  this.requestsPerSecond = options.requestsPerSecond;
  this.promiseImplementation = options.promiseImplementation || Promise;
  this.delay = Math.floor(1000 / this.requestsPerSecond);
  this.delayId = null;
  this.executing = false;
  this.queued = [];
}
/**
 * @constructor
 * @param {Object} options A set of options to pass to the throttle function
 * @param {number} requestsPerSecond The amount of requests per second
 *                                          the library will limit to
 */
@constructor
@param {Object} options A set of options to pass to the throttle function
@param {number} requestsPerSecond The amount of requests per second
the library will limit to
@constructor @param { Object } options A set of options to pass to the throttle function @param { number } requestsPerSecond The amount of requests per second the library will limit to
function PromiseThrottle (options) {
  this.requestsPerSecond = options.requestsPerSecond;
  this.promiseImplementation = options.promiseImplementation || Promise;
  this.delay = Math.floor(1000 / this.requestsPerSecond);
  this.delayId = null;
  this.executing = false;
  this.queued = [];
}
function PromiseThrottle ( options ) { this . requestsPerSecond = options . requestsPerSecond ; this . promiseImplementation = options . promiseImplementation || Promise ; this . delay = Math . floor ( 1000 / this . requestsPerSecond ) ; this . delayId = null ; this . executing = false ; this . queued = [ ] ; }
@constructor
 @param {Object} options A set of options to pass to the throttle function
 @param {number} requestsPerSecond The amount of requests per second
                                          the library will limit to
@constructor @param { Object } options A set of options to pass to the throttle function @param { number } requestsPerSecond The amount of requests per second the library will limit to