blockfrost / blockfrost-websocket-link

WebSocket link for Blockfrost.io API.
Apache License 2.0
8 stars 3 forks source link

refactor: remove pLimiter code repetition #266

Closed iccicci closed 6 days ago

iccicci commented 1 week ago

Apart from when it is used to gather stats, pLimiter is always used with pLimiter.add(task, { throwOnTimeout: true }).

This PR add the limiter utility to remove this code repetition also increasing a bit the readability.

This takes the place of #265, closed by error.