Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/lcid/index.js')
-rw-r--r--node_modules/lcid/index.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/node_modules/lcid/index.js b/node_modules/lcid/index.js
index b666ef00a..69bd3d231 100644
--- a/node_modules/lcid/index.js
+++ b/node_modules/lcid/index.js
@@ -1,10 +1,9 @@
'use strict';
-const invertKv = require('invert-kv');
-const all = require('./lcid.json');
+var invertKv = require('invert-kv');
+var all = require('./lcid.json');
+var inverted = invertKv(all);
-const inverted = invertKv(all);
-
-exports.from = lcidCode => {
+exports.from = function (lcidCode) {
if (typeof lcidCode !== 'number') {
throw new TypeError('Expected a number');
}
@@ -12,7 +11,7 @@ exports.from = lcidCode => {
return inverted[lcidCode];
};
-exports.to = localeId => {
+exports.to = function (localeId) {
if (typeof localeId !== 'string') {
throw new TypeError('Expected a string');
}