throttled-queue
throttled-queue copied to clipboard
Bug
Describe the bug
The library does not through an error if provided with a string in place of number, as expected for maxRequestsPerInterval field
To Reproduce Steps to reproduce the behavior: Please use the below code to reproduce the behavior
static throttle = throttledQueue("100 // at most 100 requests per second", 1000);
let {data} = await throttle(() => {
return axios({
method: 'get',
url: <URL>,
});
});
Expected behavior It should raise an error that input is invalid
Additional context I am fine to raise a PR to fix this issue if allowed