debounce-request
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Prevent duplicate requests

example:

import mockRequest from 'xx';
const request = DebounceRequest(mockRequest,500)
request({data: 1}) // from field a
request({data: 1}) // from field b
request({data: 1}) // from field c

the main of top code is: if many same(params) request within 500ms, the request only execte once.

Package Sidebar

Install

npm i debounce-request

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

19.5 kB

Total Files

9

Last publish

Collaborators

  • andy00614