Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/@formatjs/ecma402-abstract/PluralRules/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ResolvePlural = void 0;
var utils_1 = require("../utils");
var _262_1 = require("../262");
var FormatNumericToString_1 = require("../NumberFormat/FormatNumericToString");
var GetOperands_1 = require("./GetOperands");
/**
* http://ecma-international.org/ecma-402/7.0/index.html#sec-resolveplural
* @param pl
* @param n
* @param PluralRuleSelect Has to pass in bc it's implementation-specific
*/
function ResolvePlural(pl, n, _a) {
var getInternalSlots = _a.getInternalSlots, PluralRuleSelect = _a.PluralRuleSelect;
var internalSlots = getInternalSlots(pl);
utils_1.invariant(_262_1.Type(internalSlots) === 'Object', 'pl has to be an object');
utils_1.invariant('initializedPluralRules' in internalSlots, 'pluralrules must be initialized');
utils_1.invariant(_262_1.Type(n) === 'Number', 'n must be a number');
if (!isFinite(n)) {
return 'other';
}
var locale = internalSlots.locale, type = internalSlots.type;
var res = FormatNumericToString_1.FormatNumericToString(internalSlots, n);
var s = res.formattedString;
var operands = GetOperands_1.GetOperands(s);
return PluralRuleSelect(locale, type, n, operands);
}
exports.ResolvePlural = ResolvePlural;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0252 ]-- |