diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..20c469a --- /dev/null +++ b/.npmignore @@ -0,0 +1,6 @@ +node_modules/ +.github/ +.editorconfig +.gitattributes +.gitignore +index.test.js diff --git a/README.md b/README.md index 38fa8c2..af6bc5d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Timeout and Interval Implementation of setTimeout and setInterval with pause. -**This package is currently NOT tested, I would love to hear your feedback!! Feel free to [open an issue](https://github.com/blaumeise20/date-timeout-interval/issues/new)!** +**The test coverage of this package is currently NOT GOOD, I would love to hear your feedback!! Feel free to [open an issue](https://github.com/blaumeise20/date-timeout-interval/issues/new)!** ## Instalation @@ -30,19 +30,19 @@ This will add `Timeout` and `Interval` to `Date`. `autoStart: boolean` - If the timer should automatically start. This will call `start` internally. * `start(): this` - + Starts the timer. If the timer is currently paused, it will resume the timer. * `stop(): this` - + Stops the timer and resets it to 0. Acts like `clearTimeout`. * `pause(): this` - + Pauses the timer without reseting it. This is the main functionality of this class. * `state: 0 | 1 | 2 | 3` - + Defines the current state of the timer. | State | Description | |:-----:| ----------- | @@ -65,19 +65,19 @@ This will add `Timeout` and `Interval` to `Date`. `autoStart: boolean` - If the timer should automatically start. This will call `start` internally. * `start(): this` - + Starts the interval. If the interval is currently paused, it will resume the interval. * `stop(): this` - + Stops the interval and resets it to 0. Acts like `clearInterval`. * `pause(): this` - + Pauses the interval without reseting it. This will also remember the time left to the next call, so if you resume it again, it will continue at the position it stopped. * `state: 0 | 1 | 2` - + Defines the current state of the interval. These are the same as with the timeout, but there is no "end" state, because the interval will never end. | State | Description | |:-----:| ----------- | @@ -94,4 +94,4 @@ This will add `Timeout` and `Interval` to `Date`. This will return the time left for the next execution to happen. **Warning: This will call a getter which will calculate the time, don't use this too often.** # Licence -This project is licenced under the MIT licence. Read it [here](LICENCE). \ No newline at end of file +This project is licenced under the MIT licence. Read it [here](LICENCE). diff --git a/package-lock.json b/package-lock.json index 5885bbb..a7b6f4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "date-timeout-interval", - "version": "1.0.1", + "version": "1.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 6103482..ca4b80c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "date-timeout-interval", - "version": "1.0.1", + "version": "1.1.0", "description": "Implementation of setTimeout and setInterval with pause", "main": "index.js", "scripts": {