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/intl-numberformat/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.shouldPolyfill = void 0;
/**
* Check if Intl.NumberFormat is ES2020 compatible.
* Caveat: we are not checking `toLocaleString`.
*
* @public
* @param unit unit to check
*/
function supportsES2020() {
try {
var s = new Intl.NumberFormat('en', {
style: 'unit',
// @ts-expect-error the built-in typing isn't supporting ES2020 yet.
unit: 'bit',
unitDisplay: 'long',
notation: 'scientific',
}).format(10000);
// Check for a plurality bug in environment that uses the older versions of ICU:
// https://unicode-org.atlassian.net/browse/ICU-13836
if (s !== '1E4 bits') {
return false;
}
}
catch (e) {
return false;
}
return true;
}
function shouldPolyfill() {
return (typeof Intl === 'undefined' ||
!('NumberFormat' in Intl) ||
!supportsES2020());
}
exports.shouldPolyfill = shouldPolyfill;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0212 ]-- |