Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidvollmers/debouncer
Debounce your code!
https://github.com/davidvollmers/debouncer
csharp debounce debouncer dotnet
Last synced: 15 days ago
JSON representation
Debounce your code!
- Host: GitHub
- URL: https://github.com/davidvollmers/debouncer
- Owner: DavidVollmers
- License: mit
- Created: 2024-05-13T18:19:56.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-22T08:42:42.000Z (7 months ago)
- Last Synced: 2024-11-29T17:49:40.499Z (23 days ago)
- Topics: csharp, debounce, debouncer, dotnet
- Language: C#
- Homepage: https://www.nuget.org/packages/Debouncer
- Size: 81.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![](https://img.shields.io/github/v/release/DavidVollmers/Debouncer)](https://github.com/DavidVollmers/Debouncer/releases)
[![](https://img.shields.io/nuget/dt/Debouncer)](https://www.nuget.org/packages/Debouncer)
[![](https://img.shields.io/github/license/DavidVollmers/Debouncer)](https://github.com/DavidVollmers/Debouncer/blob/master/LICENSE.txt)# Debouncer
> Debounce your code!
## What and Why?
Debouncing is a programming practice used to ensure that time-consuming tasks do not fire so often, that it stalls the
performance of the web page. In other words, it limits the rate at which a function gets invoked.A real-life example of debouncing is the search functionality on Google. When you type something in the search bar, it
doesn't start searching immediately. It waits for you to stop typing for a moment, and then it starts searching.## Installation
```shell
dotnet add package Debouncer
```Visit [nuget.org](https://www.nuget.org/packages/Debouncer) for more information.
## Usage
```csharp
using Debouncer;var debouncer = Debouncer.Debounce(() => {
// Your code here
}, 1000);debouncer.Invoke();
debouncer.Invoke();
debouncer.Invoke();// After 1000ms, the code will be executed only once
```---
## License
This project is licensed under the [MIT](LICENSE.txt) license.