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

@axeptio/geo-compliance

v0.1.0

Published

ISO 3166-2 validation, country/subdivision group definitions, and CLDR-backed i18n for Axeptio's cookie banner platform. Consumed by caas-api and caas-styleguide. Not consumed by widget-client (the SDK reads pre-computed data published by caas-api).

Readme

@axeptio/geo-compliance

ISO 3166-2 validation, country/subdivision group definitions, and CLDR-backed i18n for Axeptio's cookie-banner platform.

Status

Wave 1 complete — all five modules implemented and tested. 248 tests passing; CommonJS + ESM + types all build. Ready to be consumed by caas-api and caas-styleguide once the package is pushed to GitHub and added as a submodule.

Consumers

  • caas-api (backend, Node): write-path validation, publish-time group expansion and specificity pre-computation, audit script.
  • caas-styleguide (Admin Console, React/TS): GeoTargetField UI controls, validation, localized labels.

Not consumed by widget-client. The SDK reads pre-computed targets from the published config payload — it doesn't import this package. The SDK keeps its zero-new-dependency posture; bundle-size constraints (loaded on hundreds of thousands of sites) forbid centralizing runtime logic here.

Modules

| Module | Purpose | Status | |---|---|---| | defaults | Symbolic constants (locale list, viewer-unknown sentinel, placeholders, specificity scores). Each under non-regression test per in-a-box/CLAUDE.md. | ✅ 14 tests | | iso31662 | Country + subdivision validation (strict via membership; lenient via regex). | ✅ 66 tests | | groups | Country groups (EEA_UK_CH, EEA, EU) and subdivision groups (CCPA_STATES). Expansion + nesting precedence. | ✅ 55 tests | | target | GeoTarget discriminated union, matches, specificity, projectForPublish, overlap detection. | ✅ 54 tests | | i18n | Localized country (CLDR), subdivision (hand-authored for CA/US CCPA + iso-3166-2 fallback), group names (hand-authored). EN/FR/ES/IT/PT. | ✅ 59 tests |

Build

yarn install
yarn build         # CommonJS + ESM + types
yarn test          # jest, *.node-test.ts
yarn lint          # tsc --noEmit
yarn format:fix    # prettier

The prebuild step runs scripts/generate.mjs to regenerate CLDR-derived JSON committed to src/generated/.

Design principles

  1. Strict on write, lenient on read. Reads of existing data never crash; writes enforce ISO 3166-2 membership. See in-a-box/CLAUDE.md "You may change non-conforming code only during refactoring."
  2. Symbolic defaults. No magic numbers or string literals scattered through code; every constant lives in src/defaults.ts with a non-regression test.
  3. Greenfield groups, no migration. Group definitions land in data/groups.supplemental.json; existing cookies docs never carried a group, so there's no data to migrate.
  4. Domain separation. Geo only. Regulation (gdpr, ccpa, etc.) lives elsewhere — see the plan's "Relationship to regulation management" section.

Curated groups (MVP)

| Code | Kind | Members | Notes | |---|---|---|---| | EU | country | 27 ISO 3166-1 codes | EU member states. | | EEA | country | 30 codes | EU + IS, NO, LI. | | EEA_UK_CH | country | 32 codes | EEA + UK + CH. The Google CMP grouping. | | CCPA_STATES | subdivision | ISO 3166-2 codes under US-* | Membership flagged for legal review. |

Curated nesting precedence: smaller membership wins (EU > EEA > EEA_UK_CH).

Repository status

Stand-alone package. Once published, will be added as a git submodule under in-a-box/geo-compliance/ following the existing monorepo pattern.