Promise Throttle Versions Save

A small library to throttle promises. Useful to avoid rate limiting when using REST APIs.

v1.1.2

3 years ago

Fix add and addAll TypeScript typings (#83). Thanks @draperunner!

v1.1.1

3 years ago

This update adds Typescript typings to the list of files in the package #77. Thanks @draperunner for contributing!

v1.1.0

4 years ago

This update adds Typescript typings to the library https://github.com/JMPerez/promise-throttle/pull/76. Thanks @IlyaSemenov for contributing!

v1.0.1

4 years ago

This update contains upgrades in outdated dependencies that solve known vulnerabilities in packages.

v1.0.0

6 years ago

This version adds a signal parameter that allows the cancellation or abort operation of one or several queued promises. This is similar to the mechanism by which a fetch() request can be aborted using AbortController.

Note about upgrading to version 1.0.0 If you were using the weight option, you will need to pass it as a property in the options object.

pt.add(..., 2 /* weight*/);

becomes

pt.add(..., {weight: 2});

this is so we can accommodate new options like signal.

v0.4.0

6 years ago

Added a weight parameter to consider that a certain promise counts more towards the rate limit.

Thanks @pldin601 for your contribution!

v0.3.1

7 years ago

When installing this package as a dependency it will now not include unneeded files like tests or linting configuration, thus reducing the size of the dependency to the bare minimum.

v0.3.0

7 years ago

This version makes a non-breaking change to the addAll() method, which now returns a Promise itself. This change was proposed and implemented by @mawrkus. Big kudos to him and thanks for contributing!

The development, testing and reporting flow has also been simplified and improved.