UNPKG

poe-i18n

Version:

i18n utility for Path of Exile

32 lines (31 loc) 975 B
"use strict"; var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; Object.defineProperty(exports, "__esModule", { value: true }); var default_gender = 'N'; var default_plural = 'S'; function inflectionIdentifier(context) { var _a; var inflection = context.inflection; var gender; var plural; if (inflection != null) { _a = __read(inflection.split(''), 2), gender = _a[0], plural = _a[1]; } return [gender || default_gender, plural || default_plural].join(''); } exports.default = inflectionIdentifier;