Nexapp / debounce-await

Debounce async functions based on the function's resolve status

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Debounce async functions based on the function's resolve status


Languages

Language:TypeScript 92.7%Language:JavaScript 7.3%