https://github.com/prozi/throttle-timers
lodash throttle override global setTimeout and setInterval
https://github.com/prozi/throttle-timers
Last synced: 4 months ago
JSON representation
lodash throttle override global setTimeout and setInterval
- Host: GitHub
- URL: https://github.com/prozi/throttle-timers
- Owner: Prozi
- License: mit
- Created: 2024-11-09T21:56:36.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-09T23:11:32.000Z (7 months ago)
- Last Synced: 2024-12-17T22:12:31.034Z (6 months ago)
- Language: TypeScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Usage
```
const { setTimeout, setInterval } = require('throttle-timers');globalThis.setTimeout = setTimeout;
globalThis.setInterval = setInterval;
```or
```
node -r throttle-timers/register file.js
```## Then
all your `setInterval` and `setTimeout`
calls won't happen too often as they're protected by `lodash` `throttle` with the same time
automagically
## Install
```
npm i throttle-timers -D
```## License
MIT