mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-13 14:05:27 +00:00
update
This commit is contained in:
22
node_modules/lcid/index.js
generated
vendored
Normal file
22
node_modules/lcid/index.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
'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;
|
Reference in New Issue
Block a user