microlinkhq / async-ratelimiter

Rate limit made simple, easy, async.
MIT License
320 stars 23 forks source link

Allow custom max value in .get #1

Closed marcuspoehls closed 6 years ago

marcuspoehls commented 6 years ago

This PR adds the functionality to pass a custom max value as limit to limiter.get(). This is useful for user-specific limits and does not require a different rate limiter instance for each request.

Looking forward to feedback :)

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 17


Totals Coverage Status
Change from base Build 15: 0.5%
Covered Lines: 24
Relevant Lines: 24

💛 - Coveralls
Kikobeats commented 6 years ago

Good idea, do you think could be useful customize duration as well?

marcuspoehls commented 6 years ago

Yeah, I think customizing the duration makes sense.

Do you want that in a second PR?

Kikobeats commented 6 years ago

yes please 🙂

marcuspoehls commented 6 years ago

Alright, sounds good :smiley: Will create a second PR on a different branch in my fork

marcuspoehls commented 6 years ago

PR: https://github.com/microlinkhq/async-ratelimiter/pull/2