
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Of course! 🚀
Let’s make you a professional and clean README.md for your package usehmtimer.
Here’s a full version you can directly use:
⏳ A lightweight React hook for handling timers, countdowns, and time-ago formatting easily!
npm install usehmtimer
or with yarn:
yarn add usehmtimer
import useMyTimer from "usehmtimer";
function MyComponent() {
const { timeAgo, seconds, remaining, StartTimer, StopTimer, ResetTimer } =
useMyTimer({ targetDate: "2025-12-31T23:59:59" });
return (
<div>
<p>Timer seconds: {seconds}</p>
<p>Remaining Days: {remaining.days}</p>
<button onClick={StartTimer}>Start</button>
<button onClick={StopTimer}>Stop</button>
<button onClick={ResetTimer}>Reset</button>
</div>
);
}
useMyTimer(props?: UseMyTimerProps)| Prop | Type | Description |
|---|---|---|
targetDate | string | (Optional) ISO string of the future target date, e.g., "2025-12-31T23:59:59". |
| Name | Type | Description |
|---|---|---|
timeAgo(date1, date2, lang?) | (string, string, "ar" | "en") => string | Calculate time difference human-readable (e.g., "2 hours ago"). |
seconds | number | Timer seconds since started. |
remaining | DateSections | Object containing { years, months, days, hours, minutes, seconds } till targetDate. |
StartTimer | () => void | Start the seconds timer. |
StopTimer | () => void | Stop the timer. |
ResetTimer | () => void | Reset seconds to 0. |
type DateSections = {
years: number;
months: number;
days: number;
hours: number;
minutes: number;
seconds: number;
};
interface UseMyTimerProps {
targetDate?: string;
}
MIT © Habib Mohammed
Feel free to open issues or pull requests to improve this hook!
PRs and ideas are very welcome ✨
remaining, it's better to pass a targetDate to useMyTimer.Would you like me also to make you a small badge section (like "npm version", "bundle size", etc.)? 🚀✨
It will make your README look even cooler! 🎖️
Want me to add it? 🎨👑
FAQs
All about time - React hook
We found that usehmtimer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.