All Downloads are FREE. Search and download functionalities are using the official Maven repository.

node_modules.lcid.index.js Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
'use strict';
var invertKv = require('invert-kv');
var all = require('./lcid.json');
var inverted = invertKv(all);

exports.from = function (lcidCode) {
	if (typeof lcidCode !== 'number') {
		throw new TypeError('Expected a number');
	}

	return inverted[lcidCode];
};

exports.to = function (localeId) {
	if (typeof localeId !== 'string') {
		throw new TypeError('Expected a string');
	}

	return all[localeId];
};

exports.all = all;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy