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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tm11/mmgeo

v1.0.4

Published

A comprehensive package providing states, districts, and townships data for Myanmar in both English and Myanmar languages.

Readme

@tm11/mmgeo

@tm11/mmgeo is a lightweight and comprehensive NPM package that provides geographic data for Myanmar, including states, districts, and townships. The data is available in both English and Myanmar languages, making it perfect for localization purposes in Myanmar-based applications.

Features

  • Complete geographic data for Myanmar (states, districts, and townships)
  • Bilingual support (English and Myanmar languages)
  • TypeScript support with full type definitions
  • Simple and intuitive API
  • Lightweight package with minimal dependencies
  • Easy language switching functionality

Installation

You can install this package using NPM:

npm install @tm11/mmgeo

Or with Yarn:

yarn add @tm11/mmgeo

NPM Version NPM Downloads

Quick Start

import { initialize, getStates } from '@tm11/mmgeo';

// Initialize with English language (default)
initialize({ language: 'en' });

// Get all states
const states = getStates();
console.log(states[0].en); // "Kachin State"

// Switch to Myanmar language
initialize({ language: 'mm' });
console.log(states[0].mm); // Myanmar name

Data Structure

State Object

interface State {
  en: string;      // English name
  mm: string;      // Myanmar name
  lat: number;     // Latitude
  lng: number;     // Longitude
  capital: string; // Capital city
  districts: District[];
}

interface District {
  en: string;      // English name
  mm: string;      // Myanmar name
  townships: Township[];
}

interface Township {
  en: string;      // English name
  mm: string;      // Myanmar name
}

API Reference

Configuration

initialize(options: ConfigOptions)

Initialize the package with configuration options.

interface ConfigOptions {
  language: 'en' | 'mm';  // Language setting
}

Example:

import { initialize } from '@tm11/mmgeo';

// Set language to Myanmar
initialize({ language: 'mm' });

Data Retrieval

getStates(): State[]

Returns an array of all states in Myanmar.

getDistricts(stateName: string): District[]

Returns districts for a specific state.

getTownships(districtName: string): Township[]

Returns townships for a specific district.

Examples

Basic Usage

import { initialize, getStates } from '@tm11/mmgeo';

// Initialize in English
initialize({ language: 'en' });

// Get all states
const states = getStates();
console.log(states[0].en); // "Kachin State"

Language Switching

import { initialize, getStates } from '@tm11/mmgeo';

// Start with English
initialize({ language: 'en' });
const statesEn = getStates();
console.log(statesEn[0].en); // "Kachin State"

// Switch to Myanmar
initialize({ language: 'mm' });
const statesMm = getStates();
console.log(statesMm[0].mm); // Myanmar name

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This package is licensed under the ISC License. See the LICENSE file for more information.