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

@isworkday/cli

v1.0.0

Published

Command-line predicate: is DATE a statutory workday in REGION? One word, one exit code, official calendars that update themselves. Only cn (mainland China) so far.

Readme

isworkday

A command-line predicate that does what its name says: isworkday cn && ./deploy.sh.

Only cn (mainland China) is supported so far.

Answers follow the official calendar, kept current online: next year's schedule needs no upgrade, and a date not yet announced is unknown, never a guess.

Install

brew install pentatea/tap/isworkday
uvx isworkday cn                      # or: uv tool install isworkday
npx -y @isworkday/cli cn              # or: npm i -g @isworkday/cli
go install github.com/PentaTea/isworkday@latest

In a container or CI, take the binary directly:

curl -fsSL https://github.com/PentaTea/isworkday/releases/latest/download/isworkday-$(uname -s)-$(uname -m).tar.gz | tar -xzC /usr/local/bin isworkday

macOS builds need macOS 13 or later.

Use

$ isworkday cn
2026-10-19 Mon · weekday
true
$ isworkday cn 2026-10-10
2026-10-10 Sat · workday (国庆节 补班)
true

A date whose schedule isn't out yet:

$ isworkday cn 2027-05-01
unknown
error: no data for 2027-05-01 yet — covered through 2026-12-28

The answer is the word on stdout and the exit code; the reason line goes to stderr. tomorrow works too.

today and tomorrow are dates in REGION (for cn, Asia/Shanghai, UTC+8), whatever the machine's time zone; when the local date differs, the reason line says so. To ask about the local date, pass it: isworkday cn "$(date +%F)".

Output

| stdout | exit | meaning | stderr | |---|---|---|---| | true | 0 | workday in REGION (cn: Mon–Fri, or a 补班 make-up day on a weekend) | reason line | | false | 1 | holiday or weekend in REGION | reason line | | unknown | 3 | no data for that date yet | error: … | | (empty) | 2 | usage error | error: … |

Data

Calendars ship separately from the binary: a GitHub Action in this repository publishes data/<region>.json. Each binary embeds a snapshot as a fallback, refreshes at most every 12 h into $XDG_CACHE_HOME/isworkday (default ~/.cache/isworkday), and never steps back to older data.

  • Propagation: a new year's schedule reaches every machine within a day of an upstream publishing it. A change to an already published year goes out once the upstreams agree or a maintainer adds a patch.
  • Offline: answers come from the last known data, with a warning:
    warning: using data as of 2025-11-04 — refresh failed: cdn.jsdelivr.net: timeout after 3s; raw.githubusercontent.com: HTTP 429
  • verified: when the pipeline last confirmed the upstreams agree, renewed at least every 30 days. Fetched data unverified for over 90 days warns:
    warning: data last verified 2026-07-01, over 90 days ago — the data pipeline may have stopped; see https://github.com/PentaTea/isworkday

cn

Every 6 hours the Action merges holiday-cn and chinese-days, MIT-licensed projects (see NOTICE) built from the notices of the General Office of the State Council (国务院办公厅), requires them to agree day by day, and publishes data/cn.json at:

https://cdn.jsdelivr.net/gh/PentaTea/isworkday@main/data/cn.json
https://raw.githubusercontent.com/PentaTea/isworkday/main/data/cn.json   (fallback)

These URLs are a contract: the file stays schema 1.

For AI agents

SKILL.md is a ready-made skill: drop it into your agent's skills directory or instructions.

Troubleshooting

  • Allowlisted network: data needs cdn.jsdelivr.net (fallback raw.githubusercontent.com); the curl install needs github.com and release-assets.githubusercontent.com. HTTPS_PROXY and NO_PROXY are honored, SSL_CERT_FILE on Linux; macOS uses the system keychain.
  • Refresh fails with an x509 error on a bare image: install ca-certificates.
  • Internal mirror or fork: ISWORKDAY_DATA_URL=https://… isworkday cn fetches from that URL only.
  • Force a refresh: rm -rf ~/.cache/isworkday.

Regions

  • cn — mainland China, the State Council's nationwide schedule. Not included: stock-exchange trading days, regional holidays, half-day holidays for some groups (such as 妇女节).

Report a wrong date

Open an issue with a link to the official notice. The fix is a patch and reaches installed binaries within a day, no upgrade needed.

Contributing

PRs adding regions are welcome. A region takes an ISO 3166 code, a data/<code>.json built by an adapter in pipeline/, and a region like the one in cn.go (UTC offset, weekend days). Cite the official source of the schedule.

License

MIT