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

@reignite/no-core

v0.0.5

Published

Core Utility library for country level right Naming Order

Downloads

27

Readme

@reignite/no-core

Core utility library for naming order functionality for Country-based names arrangement in TypeScript/JavaScript

Built for inclusive, culturally aware form generation. Oblivious to the classic "First Name - Last Name" norm.

Overview

@reignite/no-core is a lightweight utility library that provides functions to retrieve nationally accurate, culturally appropriate personal name structures/arrangement (naming order) based on ISO 3166-1 alpha-2 country codes.

The package loads a core.json dataset containing naming orders for different countries. For example, some cultures use "Given + Family," others "Family + Given," and so on. This library enables dynamic, regionally appropriate form generation and data validation.

Installation

npm install @reignite/no-core

# or

yarn add @reignite/no-core

API Reference

All functions start with N (uppercase N) by convention.

NONames(countryCode: ISO2Codes): string[]

Description: Returns an array of name components (in English or the first available other language) for the specified country.

Example:

NONames("JP");
// ["Surname + Given Name(s)", "姓 + 名"]

NONamesWF(countryCode: ISO2Codes, fallbackCode: ISO2Codes): string[]

Description: Same as NONames, but if the primary country code is not found, it falls back to the secondary code.

Example:

NONamesWF("ZZ", "UG");
// Since "ZZ" is unknown, returns naming order for "UG" as a string Array.

NONamesFC(countryCode: ISO2Codes): CountryInfo

Description: Returns the full CountryInfo object from the JSON dataset for the given country code.

Throws:

  • If the country code is invalid (not a string)

  • If the code is not in the dataset

Example:

const info = NONamesFC("AL");

/*
    {
        "country": "Albania",
        "code": "AL",
        "Naming Order": {
            "English": "Given Name + Family Name",
            "Albanian": "Emri i dhënë + Mbiemri"
        }
    }
*/

NONamesEnum(countryCode: ISO2Codes, fallbackCode?: ISO2Codes): [english: string, other?: string]

Description: Returns a tuple with:

  • The English naming order string

  • The translation of that english sentence in the countries primary official language naming order (if available or undefined).

const [english, local] = NONamesEnum("CN");
console.log(english); // "Surname + Given Name(s)"
console.log(local); // "姓 + 名"

Complete Example Usage

import { NONames, NONamesWF, NONamesEnum, NONamesFC } from "@reignite/no-core";

const parts = NONames("KE");
console.log(parts);

// With Fallback country code
const fallback = NONamesWF("ZZ", "KE");
console.log(fallback);

// Full Country details
const countryInfo = NONamesFC("UG");
console.log(countryInfo);

// english version and local translation in enum
const [en, local] = NONamesEnum("JP");
console.log(`English: ${en}, Local: ${local}`);

Types

  • ISO2Codes A string union of ISO alpha-2 codes,

    "AF" | "AL" | "DZ" | "AD" | "AO" | "AG" | "AR" | "AM" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BT" | "BO" | "BA" | "BW" | "BR" | "BN" | "BG" | "BF" | ... 167 more ... | "PS"
  • CountryInfo

interface CountryInfo {
    code: string;
    country: string;
    "Naming Order": {
        English: string;
        [otherLanguage: string]: string | undefined;
    };
}

Dataset (core.json)

The core.json file contains naming orders per country in form:

[
    ...
    {
        "code": "US",
        "country": "United States",
        "Naming Order": {
            "English": "First Name + Middle Name (optional) + Last Name",
        }
    },
  ...
]

Error Handling

  • NONamesFC throws if the code is invalid or not recognized.

  • Other functions return:

    • An empty array ([]) if not found
    • Or a ts tuple/js two-element array ["", undefined] in NONamesEnum.

License

MIT © reignite

author — ssekandi

Gotcha section 😏😏 { Ignore if you are a serious person by nature }

  • @reignite/no-core is read as At Re-Ignite slash naming order core
  • NONamesFC is read as Naming Order Names Full Country set
  • NONamesWF is read as Naming Order Names With Fallback
  • NONamesEnum is read as Naming Order Names Enum
  • NONames is read as Naming Order Names

Oops — I know you have been reading it as literal no🤣🤣