Skip to content

Debounce async functions based on the function's resolve status

Notifications You must be signed in to change notification settings

Nexapp/debounce-await

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

$ npm install @nexapp/debounce-await --save

or

$ yarn add @nexapp/debounce-await

Usage

Like debounce, but instead of using a delay, it's based on promises' resolve status.

Eg: If you execute a promise twice, but the first promise has not resolved, it won't trigger the second one.

For code examples, please refer to the tests.