1 |
|
2 |
|
3 | const table = require('./base-table.json')
|
4 |
|
5 | // map for code -> print friendly name
|
6 | const tableByCode = {}
|
7 |
|
8 | for (const [name, code] of Object.entries(table)) {
|
9 | if (tableByCode[code] === undefined) tableByCode[code] = name
|
10 | }
|
11 |
|
12 | module.exports = Object.freeze(tableByCode)
|