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

countries-codes-enar

v1.0.1

Published

![Package Size](https://deno.bundlejs.com/badge?q=countries-codes-enar) [![JSR](https://jsr.io/badges/@praveen/countries-codes-enar)](https://jsr.io/@praveen/countries-codes-enar) [![JSR Score](https://jsr.io/badges/@praveen/countries-codes-enar/score)](h

Readme

countries-codes-enar

Package Size JSR JSR Score

TypeScript friendly country data (English and Arabic) with powerful search utilities.


🚀 Features

  • 🌍 Full list of 249 countries
  • 🇬🇧 English name, 🇸🇦 Arabic name, ISO codes (ISO2 & ISO3), and country calling codes
  • 🔍 Fast, type-safe search functions
  • 🧑‍💻 Ready for Node.js, Bun, Deno, and browser via CDN

📦 Installation

# npm
npm install countries-codes-enar

# bun
bun add countries-codes-enar

# yarn
yarn add countries-codes-enar

# pnpm
pnpm add countries-codes-enar

# CDN
https://unpkg.com/[email protected]/build/index.js

📚 Usage

import {
    COUNTRIES_DATA,
    getByIsoCode2,
    getByCountryCode,
    getByCountryName,
    getByCountryArabicName,
    searchByCountryName,
    searchByCountryArabicName,
    searchCountryData
} from 'countries-codes-enar';

// Example: Get country by ISO 2 code
const india = getByIsoCode2('IN');
console.log(india);

// Example: Get country by country calling code
const usa = getByCountryCode('1');
console.log(usa);

// Example: Get country by English name
const egypt = getByCountryName('Egypt');
console.log(egypt);

// Example: Get country by Arabic name
const saudi = getByCountryArabicName('المملكة العربية السعودية');
console.log(saudi);

// Example: Search by partial English name
const searchResults = searchByCountryName('Uni');
console.log(searchResults);

// Example: Search by partial Arabic name
const searchArabic = searchByCountryArabicName('الم');
console.log(searchArabic);

// Example: Search by any name or code
const generalSearch = searchCountryData('SA');
console.log(generalSearch);

🗃️ API Reference

| Function | Description | | --------------------------------- | ---------------------------------------- | | COUNTRIES_DATA | Full array of all country data | | getByIsoCode2(code2) | Get country by ISO 2 code | | getByCountryCode(code) | Get country by calling code | | getByCountryName(name) | Get country by exact English name | | getByCountryArabicName(name) | Get country by exact Arabic name | | searchByCountryName(name) | Search countries by partial English name | | searchByCountryArabicName(name) | Search countries by partial Arabic name | | searchCountryData(nameOrCode) | Search by any name, Arabic name, or code |


✨ Example Country Object

{
    country: "India",
    isoCode2: "IN",
    isoCode3: "IND",
    arabicName: "الهند",
    countryCodes: ["91"]
}

📄 License

MIT