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

medhira-jst-functions

v0.0.1

Published

JavaScript/TypeScript utility functions for locale and language handling - Powered by MEDHIRA

Downloads

120

Readme


medhira-jst-functions

MEDHIRA JST Functions is a JavaScript/TypeScript utility package that provides functions for locale and language handling. It helps developers work with native language codes and related information.

Why MEDHIRA?

In modern applications, internationalization is key. MEDHIRA JST Functions provides:

  • Locale Lookup - Find locale by language code
  • Language Search - Search locales by language name
  • Complete List - Access all available locales
  • TypeScript Support - Full type definitions
  • Zero Dependencies - Lightweight and fast

Installation

# NPM
npm install medhira-jst-functions

# React Native
npm install --save medhira-jst-functions

# Expo
npx expo install medhira-jst-functions

Functions

getLocaleByCode

Get locale information by language code.

import { getLocaleByCode } from 'medhira-jst-functions';

console.log(getLocaleByCode('aa'));

// Output
{ id: 4096, language: 'Afar', location: null, tag: 'aa' }

getLocaleList

Get all available locales.

import { getLocaleList } from 'medhira-jst-functions';

console.log(getLocaleList());

// Output: List of all available Languages with details
{
  aa: { id: 4096, language: 'Afar', location: null, tag: 'aa' },
  'aa-dj': { id: 4096, language: 'Afar', location: 'Djibouti', tag: 'aa-DJ' },
  'aa-er': { id: 4096, language: 'Afar', location: 'Eritrea', tag: 'aa-ER' },
  'aa-et': { id: 4096, language: 'Afar', location: 'Ethiopia', tag: 'aa-ET' },
  ...
}

getLocaleByLanguage

Search locales by language name.

import { getLocaleByLanguage } from 'medhira-jst-functions';

console.log(getLocaleByLanguage('en'));

// Output: Returns the list of all tags ending with 'english'
[
  { id: 4096, language: 'English', location: 'World', tag: 'en-001' },
  { id: 9225, language: 'English', location: 'Caribbean', tag: 'en-029' },
  { id: 4096, language: 'English', location: 'Europe', tag: 'en-150' },
  { id: 19465, language: 'English', location: 'United Arab Emirates', tag: 'en-AE' },
  ...
]

Use Cases

User Language Selection

import { getLocaleByCode, getLocaleByLanguage } from 'medhira-jst-functions';

// Get user's preferred language
const userLang = 'en-US';
const locale = getLocaleByCode(userLang);

if (typeof locale !== 'string') {
  console.log(`Selected: ${locale.language} (${locale.location})`);
}

Language Dropdown

import { getLocaleList } from 'medhira-jst-functions';

// Populate language dropdown
const locales = getLocaleList();
const languageOptions = Object.entries(locales).map(([code, info]) => ({
  value: code,
  label: `${info.language}${info.location ? ` (${info.location})` : ''}`
}));

Search Languages

import { getLocaleByLanguage } from 'medhira-jst-functions';

// Search for Spanish locales
const spanishLocales = getLocaleByLanguage('Spanish');
console.log(spanishLocales);

Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request

Sponsor & Support

To keep this library maintained and up-to-date, please consider sponsoring it on GitHub.

Or, if you're looking for private support or help in customizing the experience, reach out to us at [email protected]

About MEDHIRA

MEDHIRA - Engineering Intelligence Across Everything


License

Apache-2.0


Made with passion by MEDHIRA