I'm having an issue where I rate limit an async function that accepts a callback and then I pass that rate-limited function to another library, node-stream-worker. That library checks the arity of the function and uses that to determine whether it uses async callbacks or promises. The issue arises because my original function required 2 arguments and had a .length of 2, but after it passes through your rate limiter, its .length is undefined.
I'm wondering if you would accept a pull request where I add some additional properties to the limiter object returned by the library to make the limiter appear to be more like a function. I'd like to implement at least .length, but there is a whole world of possible behaviors to implement.
I'm having an issue where I rate limit an async function that accepts a callback and then I pass that rate-limited function to another library, node-stream-worker. That library checks the arity of the function and uses that to determine whether it uses async callbacks or promises. The issue arises because my original function required 2 arguments and had a
.length
of 2, but after it passes through your rate limiter, its.length
isundefined
.I'm wondering if you would accept a pull request where I add some additional properties to the limiter object returned by the library to make the limiter appear to be more like a function. I'd like to implement at least
.length
, but there is a whole world of possible behaviors to implement.