index.js
function RateLimit(type, distFactor, config) {
  this.config = config;
  this.type = type;
  this.buckets = this.config.defaultBuckets.map(b => new TokenBucket(b.timespan, b.limit, b));
  this.retryAfter = 0;
  this.distFactor = distFactor;
}
function RateLimit(type, distFactor, config) {
  this.config = config;
  this.type = type;
  this.buckets = this.config.defaultBuckets.map(b => new TokenBucket(b.timespan, b.limit, b));
  this.retryAfter = 0;
  this.distFactor = distFactor;
}
function RateLimit ( type , distFactor , config ) { this . config = config ; this . type = type ; this . buckets = this . config . defaultBuckets . map ( b => new TokenBucket ( b . timespan , b . limit , b ) ) ; this . retryAfter = 0 ; this . distFactor = distFactor ; }
Rate limit. A collection of token buckets, updated when needed.
Rate limit . A collection of token buckets updated when needed .