-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
38 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
"@sv443-network/userutils": major | ||
--- | ||
|
||
**BREAKING** - Reworked debounce system: | ||
- Edge types `rising` and `falling` have been removed. | ||
- Added new edge types `immediate` and `idle` with new behavior. | ||
- `immediate` (default & recommended) will trigger immediately, then queue all subsequent calls until the timeout has passed. | ||
- `idle` will trigger the last queued call only after there haven't been any subsequent calls for the specified timeout. | ||
- Added `Debouncer` class for more advanced control over debouncing, and with that the following changes: | ||
- Ability to attach and manage multiple listeners. | ||
- Inherits from NanoEmitter, allowing event-based debouncing. | ||
- Can be inherited by your own classes for built-in debouncing. | ||
- `debounce()` function can still be called as usual (after replacing the edge type names with the new ones). Internally, it will instantiate a `Debouncer` instance, which is available via the `debouncer` property on the returned function. | ||
- Reduced default timeout from 300ms to 200ms. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@sv443-network/userutils": patch | ||
--- | ||
|
||
Fixed `randRange()` with `enhancedEntropy = true` only returning the first digit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@sv443-network/userutils": minor | ||
--- | ||
|
||
Moved documentation to separate file `docs.md` to speed up `README.md` load time. |