| Leo Repp | 58b9f11 | 2021-11-22 11:57:47 +0100 | [diff] [blame^] | 1 | 'use strict'; |
| 2 | const irregularPlurals = require('./irregular-plurals.json'); | ||||
| 3 | |||||
| 4 | const map = new Map(); | ||||
| 5 | // TODO: Use Object.entries when targeting Node.js 8 | ||||
| 6 | for (const key of Object.keys(irregularPlurals)) { | ||||
| 7 | map.set(key, irregularPlurals[key]); | ||||
| 8 | } | ||||
| 9 | |||||
| 10 | // Ensure nobody can modify each others Map | ||||
| 11 | Object.defineProperty(module, 'exports', { | ||||
| 12 | get() { | ||||
| 13 | return map; | ||||
| 14 | } | ||||
| 15 | }); | ||||