Gathering detailed insights and metrics for @awgv/use-timer-hook
Gathering detailed insights and metrics for @awgv/use-timer-hook
Gathering detailed insights and metrics for @awgv/use-timer-hook
Gathering detailed insights and metrics for @awgv/use-timer-hook
A pausable timer for React with millisecond precision; useful for notifications or buttons with delayed actions.
npm install @awgv/use-timer-hook
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
2 Stars
27 Commits
2 Watchers
1 Branches
1 Contributors
Updated on Jan 09, 2025
Latest Version
1.0.12
Package Id
@awgv/use-timer-hook@1.0.12
Unpacked Size
8.17 kB
Size
3.28 kB
File Count
9
NPM Version
10.8.1
Node Version
20.13.1
Published on
Jun 04, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
The hook was created as an abstraction for notifications and is essentially a pausable setTimeout()
. Neither setInterval()
nor Date()
objects are used, so if you need conventional clock functionality, you might want to check out packages that provide date/time information like amrlabib/react-timer-hook.
Package name:
@awgv/use-timer-hook
The hook is well-documented internally, so you can rely on your editor for intelligent code completion.
1import { useTimer } from '@awgv/use-timer-hook' 2 3export function YourComponent() { 4 const { 5 /** 6 * ⏲ Returns true if the timer is running. 7 */ 8 timerIsRunning, 9 /** 10 * ⏳ Stores the running timer’s remaining time and updates 11 * when the timer is paused or restarted. 12 */ 13 remainingTime, 14 /** 15 * 🔁 Starts or restarts the timer. 16 */ 17 restartTimer, 18 /** 19 * ⏯ Resumes a paused timer. 20 */ 21 resumeTimer, 22 /** 23 * ⏸ Pauses a running timer. 24 */ 25 pauseTimer, 26 /** 27 * ⏹ Completely stops the timer. 28 */ 29 stopTimer, 30 } = useTimer({ 31 /** 32 * The duration, in milliseconds, the timer should wait before 33 * `callbackToExecuteOnExpiry()` is executed. 34 */ 35 totalDurationInMilliseconds: 1000, 36 /** 37 * A function to be executed after the timer expires. 38 */ 39 callbackToExecuteOnExpiry: () => {}, 40 }) 41}
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
7 existing vulnerabilities detected
Details
Reason
project is archived
Details
Reason
Found 0/23 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More