https://github.com/ahadcove/bettertimeout
A better way to handle timeouts
https://github.com/ahadcove/bettertimeout
Last synced: about 2 months ago
JSON representation
A better way to handle timeouts
- Host: GitHub
- URL: https://github.com/ahadcove/bettertimeout
- Owner: ahadcove
- Created: 2018-02-13T22:56:36.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-13T23:01:41.000Z (about 7 years ago)
- Last Synced: 2025-01-17T19:55:40.351Z (3 months ago)
- Language: JavaScript
- Size: 0 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Better Timeout
Better timeout is a "Better" way to handle timeouts
It wil keep track of if the timeout is active or not.## Why
There are multiple instances where I had to keep track of a timeout and now I can much easier## How to use
```
var t = new Timeout(function () {
alert('this is a test');
}, 5000);
console.log(t.cleared); // false
t.clear();
console.log(t.cleared); // true
```