
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A high-performance, dependency-free Web Component for countdowns, elapsed time, and static dates. It uses a shared ticker and cached Intl formatters for maximum efficiency.
Intl objects to save memory.Intl.DurationFormat with a robust fallback for older browsers.hms, dhms, ydhms, auto, or static date.npm install wc-timer
import 'wc-timer';
// Or via script tag:
// <script type="module" src="wc-timer.js"></script>
<wc-timer target="2026-01-01T00:00:00Z"></wc-timer>
<wc-timer
target="2026-06-01T12:00:00Z"
preset="dhms"
labels="long"
compact
locale="pl">
</wc-timer>
<wc-timer preset="date" target="2025-12-31"></wc-timer>
| Attribute | Type | Default | Description |
|---|---|---|---|
target | string | now | The target date (ISO 8601 string or Date compatible). |
preset | string | auto | formatting mode: auto, hms, dhms, ydhms, date. |
labels | string | short | unit labels: none (00:00:00), short (1h 5m), long (1 hour 5 minutes). |
compact | boolean | false | if present, hides zero-value high units (e.g. hides "0 years"). |
locale | string | auto | overrides browser language (e.g. pl, en-US). |
HH:MM:SS. If duration > 30 days, it adds days.Intl.DateTimeFormat.You can control the element programmatically.
const el = document.querySelector('wc-timer');
// Update target (accepts Date object, string, or timestamp)
el.target = new Date('2030-01-01');
// Change settings on the fly
el.preset = 'ydhms';
el.compact = true;
el.labels = 'long';
Since wc-timer uses Light DOM, you can style it with standard CSS.
wc-timer {
font-family: 'Courier New', monospace;
font-weight: bold;
color: #2563eb;
}
Works in all modern browsers. It uses Intl.DurationFormat if available. Otherwise, it falls back to a custom formatter using Intl.PluralRules.
Copyright 2026 Dávid Ali
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
A lightweight, dependency-free countdown timer Web Component.
The npm package wc-timer receives a total of 0 weekly downloads. As such, wc-timer popularity was classified as not popular.
We found that wc-timer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.