Skip to content

Commit

Permalink
Clarify the behavior
Browse files Browse the repository at this point in the history
Fixes #15
  • Loading branch information
sindresorhus committed Nov 17, 2023
1 parent 329a240 commit 893d90e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ export type Options = {
};

/**
[Throttle](https://css-tricks.com/debouncing-throttling-explained-examples/) promise-returning/async/normal functions.
Throttle promise-returning/async/normal functions.
It rate-limits function calls without discarding them, making it ideal for external API interactions where avoiding call loss is crucial.
@returns A throttle function.
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# p-throttle

> [Throttle](https://css-tricks.com/debouncing-throttling-explained-examples/) promise-returning & async functions
> Throttle promise-returning & async functions
It also works with normal functions.

Useful for rate limiting calls to an external API, for example.
It rate-limits function calls without discarding them, making it ideal for external API interactions where avoiding call loss is crucial.

## Install

Expand Down

0 comments on commit 893d90e

Please sign in to comment.