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

@hitkey-io/strapi-plugin-region

v1.1.0

Published

Strapi 5 custom field for selecting country and region

Readme

Strapi Plugin Region

Cascading Country → Region selector as a Strapi 5 custom field. Pick a country, then pick a region — stored as structured JSON, auto-parsed in API responses.

MIT License Strapi 5

Features

  • Two-stage cascading selector: Country → Region with autocomplete
  • Country filtering: show all, only selected, or all except selected countries
  • ISO 3166-1 alpha-2 country codes with full country and region datasets
  • Stored as a single string field — no extra tables or relations
  • Automatic JSON parsing in API responses (Koa middleware)
  • Region overrides: replace default regions for any country with custom entries
  • Formatted "Country, Region" column in Content Manager list view

Installation

npm install @hitkey-io/strapi-plugin-region

Or with yarn:

yarn add @hitkey-io/strapi-plugin-region

Configuration

Adding the field

  1. Open the Content-Type Builder
  2. Add a new Custom field → Region Select
  3. Configure country filtering:

| Option | Description | |--------|-------------| | All countries | Show every country in the selector (default) | | Only selected | Show only the listed country codes | | All except selected | Show all countries except the listed ones |

Country codes are entered one per line in ISO alpha-2 format (e.g. US, TR, AE).

Region overrides

You can replace the default region list for any country with your own custom entries. In the Content-Type Builder, find the Region overrides section and enter one entry per line in the format:

CC:code:Name

For example:

TR:ALN:Alanya
TR:ANT:Antalya
TR:KMR:Kemer

This replaces all default regions for that country (TR in this case) with only the listed ones. Countries without overrides keep their default region lists.

Plugin config

No additional plugin configuration is needed. The plugin works out of the box once installed.

Stored value format

The field stores a JSON string in the database:

{ "country": "AE", "region": "AZ" }

API response

The plugin automatically parses stored JSON strings into objects in all /api/* responses via Koa middleware:

{
  "data": {
    "id": 1,
    "name": "Burj Al Arab Jumeirah",
    "location": {
      "country": "AE",
      "region": "AZ"
    }
  }
}

No extra configuration or population is required — it works automatically for all content types using the Region Select field.

Compatibility

| Requirement | Version | |-------------|---------| | Strapi | 5.x | | Node.js | 20+ |

License

MIT