token-dealer
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -77,6 +77,7 @@ 'use strict'; | ||
return fn(chosen.token, (reset, retry) => { | ||
options.onExhausted && options.onExhausted(chosen.token, reset); | ||
chosen.usage.exhausted = true; | ||
chosen.usage.reset = reset; | ||
options.onExhausted && options.onExhausted(chosen.token, reset); | ||
if (retry) { | ||
@@ -83,0 +84,0 @@ throw Object.assign(new Error('Token is exhausted, retrying..'), { code: 'ETOKENEXHAUSTED' }); |
{ | ||
"name": "token-dealer", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Circumvent API rate limits by having several API tokens and let the dealer manage and give them to you", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
25933