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 🙏

© 2024 – Pkg Stats / Ryan Hefner

univerlang

v0.0.1

Published

convert language codes between various formats such as IOC, ISO2, ISO3, and FIFA codes.

Downloads

15

Readme

Project Documentation

Overview

This project, univerlang, provides mapping functions to convert language codes between various formats such as IOC, ISO2, ISO3, and FIFA codes. It aims to simplify the process of language code conversion in software applications.

Installation

To use univerlang in your project, you can install it via package manager. Run the following command:

npm install univerlang

Usage

To start using univerlang, import it into your code:

const univerlang = require('univerlang');

// or ES6

import { iocToIso2,... } from "univerlang"

Converting Language Codes

univerlang provides the following functions for language code conversion:

iocToIso2(code: string): string

Converts a language code from IOC format to ISO2 format. Example:

const iocCode = 'USA';
const iso2Code = univerlang.iocToIso2(iocCode);
console.log(iso2Code); // Output: 'US'

iocToIso3(code: string): string

Converts a language code from IOC format to ISO3 format. Example:

const iocCode = 'USA';
const iso3Code = univerlang.iocToIso3(iocCode);
console.log(iso3Code); // Output: 'USA'

iocToFifa(code: string): string

Converts a language code from IOC format to FIFA format. Example:

const iocCode = 'USA';
const fifaCode = univerlang.iocToFifa(iocCode);
console.log(fifaCode); // Output: 'USA'

iso2ToIoc(code: string): string

Converts a language code from ISO2 format to IOC format. Example:

const iso2Code = 'US';
const iocCode = univerlang.iso2ToIoc(iso2Code);
console.log(iocCode); // Output: 'USA'

iso2ToIso3(code: string): string

Converts a language code from ISO2 format to ISO3 format. Example:

const iso2Code = 'US';
const iso3Code = univerlang.iso2ToIso3(iso2Code);
console.log(iso3Code); // Output: 'USA'

iso2ToFifa(code: string): string

Converts a language code from ISO2 format to FIFA format. Example:

const iso2Code = 'US';
const fifaCode = univerlang.iso2ToFifa(iso2Code);
console.log(fifaCode); // Output: 'USA'

iso3ToIso2(code: string): string

Converts a language code from ISO3 format to ISO2 format. Example:

const iso3Code = 'USA';
const iso2Code = univerlang.iso3ToIso2(iso3Code);
console.log(iso2Code); // Output: 'US'

iso3ToIoc(code: string): string

Converts a language code from ISO3 format to IOC format. Example:

const iso3Code = 'USA';
const iocCode = univerlang.iso3ToIoc(iso3Code);
console.log(iocCode); // Output: 'USA'

iso3ToFifa(code: string): string

Converts a language code from ISO3 format to FIFA format. Example:

const iso3Code = 'USA';
const fifaCode = univerlang.iso3ToFifa(iso3Code);
console.log(fifaCode); // Output: 'USA'

fifaToIso2(code: string): string

Converts a language code from FIFA format to ISO2 format. Example:

const fifaCode = 'USA';
const iso2Code = univerlang.fifaToIso2(fifaCode);
console.log(iso2Code); // Output: 'US'

fifaToIso3(code: string): string

Converts a language code from FIFA format to ISO3 format. Example:

const fifaCode = 'USA';
const iso3Code = univerlang.fifaToIso3(fifaCode);
console.log(iso3Code); // Output: 'USA'

fifaToIoc(code: string): string

Converts a language code from FIFA format to IOC format. Example:

const fifaCode = 'USA';
const iocCode = univerlang.fifaToIoc(fifaCode);
console.log(iocCode); // Output: 'USA'

Contributing

Contributions to univerlang are welcome! If you find any issues or have suggestions for improvements, please open an issue on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Made with ❤️ by Mounir Hamzaoui