index.js 362 B

123456789101112131415
  1. 'use strict';
  2. const irregularPlurals = require('./irregular-plurals.json');
  3. const map = new Map();
  4. // TODO: Use Object.entries when targeting Node.js 8
  5. for (const key of Object.keys(irregularPlurals)) {
  6. map.set(key, irregularPlurals[key]);
  7. }
  8. // Ensure nobody can modify each others Map
  9. Object.defineProperty(module, 'exports', {
  10. get() {
  11. return map;
  12. }
  13. });