npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@korvol/time

v0.1.1

Published

UTC instants, calendar dates, and elapsed-time primitives for Korvol applications

Readme

@korvol/time

Shared UTC time primitives for Korvol TypeScript applications. Extracted from Integra's stable core; no runtime dependencies. Node 22+, ESM only. Distribution is public under the @korvol npm scope. Version 0.1.1 and later are distributed under the MIT license; see LICENSE. The source repository remains private.

import { addMs, diffMs, monotonicMs, nowUtc, plainDate, toInstant } from "@korvol/time";

const received = toInstant("2026-09-22T12:00:00Z");
const expires = addMs(received, 30_000);
const duration = diffMs(expires, received); // 30000
const businessDate = plainDate("2026-09-22"); // remains a calendar date
const current = nowUtc();
const started = monotonicMs(); // process-relative sample, never an epoch timestamp

API

| Export | Contract | |---|---| | Instant | Branded UTC string with explicit Z | | PlainDate | Branded YYYY-MM-DD calendar date | | nowUtc() | Current UTC instant with milliseconds | | toInstant(string) | Validate an exact UTC instant; throws on malformed/impossible input | | isInstant(unknown) | Nonthrowing validity predicate | | diffMs(a, b) | Signed a minus b in milliseconds | | addMs(instant, ms) | Advance by milliseconds, serialize as UTC | | isWithin(a, b, ms) | Absolute difference at most ms, inclusive | | plainDate(string) | Validate a real calendar date without converting to an instant | | monotonicMs() | performance.now sample for elapsed time in one process lifetime |

Inputs accept seconds or one to three fractional digits, with uppercase Z only. Offset strings and local timestamps are rejected. Parsing preserves the valid input representation; arithmetic emits milliseconds. Branded arguments are trusted after validation. Duration inputs retain the original arithmetic behavior: callers must supply meaningful finite budgets; this package does not implement business retry/expiry policy.

Compared with Integra's original core, 0.1.0 rejects normalized impossible dates and 24:00, and monotonicMs uses a process-relative clock rather than Date.now. Never persist a monotonic sample, compare it across processes, or use it as an epoch timestamp. Library validation errors include the rejected input; consumers own sanitization before logging. No telemetry or I/O occurs in the library.

Contributor toolchain: Node 24.12.0 and pnpm 9.12.0. Run pnpm install --frozen-lockfile, pnpm hooks:install, pnpm check, and pnpm build. Consumers do not need pnpm or contributor hooks.

See docs/DEVELOPMENT.md for release mechanics, docs/SYSTEM.md for current behavior, and docs/NOTES.md for limitations. Consumer adoption is separate from package publication.