Adding a JS token bucket implementation