3.2.0 • Public • Published


A NodeJS module with three features:

  • Sort a list of Myanmar / Burmese names according to official alphabetic order
  • Remove prefixes from Myanmar / Burmese names
  • Find possible matches for a Myanmar / Burmese name using some matching rules from a large dataset

Client-side use is possible, but throws an error if your user does not have Intl or Myanmar locale support.


Removes prefixes and sorts by official alphabetic order (yes, you will need a library for this, not .sort())

On the client-side, this library uses Intl.Collator (available in modern browsers) or throws an error if it's not available. An error is also thrown if the Myanmar locale is not available for sorting. Use a try-catch block.

On the server, you can compile NodeJS with full locale support (brew reinstall node --with-full-icu), follow instructions on how to add more locales to your current install with npm install -g full-icu or use the myanmar-sort module (included in package.json).

Run npm test on this repo and it will print whether it uses the myanmar-sort or Intl.Collator sort.


In NodeJS, put this first:

var myanmarNameSort = require('myanmar-names').sort;

Pass an array of names:

var names = ["ဦးလှမြင့်", "ဦးမော"];
try {
  output = myanmarNameSort(names);
} catch (e) {
  // fallback
  output = names.sort();
> ["ဦးမော", "ဦးလှမြင့်"]

Pass an array of objects, and a function to extract the name:

output = myanmarNameSort(candidates, function(candidate) {
  return candidate.full_name;


Returns the names most likely to match a given name. Removes prefixes, and looks at commonly mistaken and missing letters (like ထ and လ, ဂ and ဝ, commonly missed ီ)

Pass a name string, and an array of potential matches, receive sorted list of best matches:

myanmarNameMatch('ထမြင့်', [
> ['ဦးလှမြင့်']

Passing a function to extract the names:

myanmarNameMatch('မြင့်', candidates, function(candidate) {
  return candidate.full_name;

On NodeJS, use this format:

var myanmarNameMatch = require('myanmar-names').match;


Prefixes from Wikipedia under a Creative Commons license

Open Sourced with an MIT License


npm i myanmar-names

DownloadsWeekly Downloads






Last publish


  • ndoiron