Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-timer-and-stopwatch

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-timer-and-stopwatch - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

2

package.json
{
"name": "react-timer-and-stopwatch",
"version": "0.6.0",
"version": "0.6.1",
"description": "A countdown timer and stopwatch hook for React",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -148,8 +148,9 @@ # React Timer and Stopwatch hook

<button onClick={togglePause} disabled={!timerIsPaused}>Toggle Pause</button>
<button onClick={resetTimer}>Reset Timer</button>
<button onClick={() => resetTimer()}>Reset Timer</button>
</>
);
}
```
**resetTimer** can reset the timer/stopwatch with the original options if no parameter is included, or you can include an options object in the first optional parameter (`adjustedOptions`) to either adjust the old options or replace the old options entirely. If you want to replace them, set the second optional parameter (`replaceOptions`) to true and be sure to include a new `create` object on your new options object.
```
There are also functions to add and subtract time from the current timer/stopwatch. These are **addTime** and **subtractTime**. Both take either a number of milliseconds or alternatively a [time object](#terminology).

@@ -156,0 +157,0 @@ #### Example

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc