@formatjs/intl-locale
Advanced tools
Comparing version 3.3.2 to 3.3.3
@@ -47,2 +47,7 @@ export interface IntlLocaleOptions { | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCalendars | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getCalendars | ||
*/ | ||
getCalendars(): string[]; | ||
/** | ||
* https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.calendars | ||
@@ -52,2 +57,7 @@ */ | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCollations | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getCollations | ||
*/ | ||
getCollations(): string[]; | ||
/** | ||
* https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.collations | ||
@@ -57,2 +67,7 @@ */ | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getHourCycles | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getHourCycles | ||
*/ | ||
getHourCycles(): string[]; | ||
/** | ||
* https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.hourCycles | ||
@@ -62,2 +77,7 @@ */ | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getNumberingSystems | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getNumberingSystems | ||
*/ | ||
getNumberingSystems(): string[]; | ||
/** | ||
* https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.numberingSystems | ||
@@ -67,2 +87,7 @@ */ | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTimeZones | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getTimeZones | ||
*/ | ||
getTimeZones(): string[] | undefined; | ||
/** | ||
* https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.timeZones | ||
@@ -72,2 +97,7 @@ */ | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getTextInfo | ||
*/ | ||
getTextInfo(): any; | ||
/** | ||
* https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.textInfo | ||
@@ -77,2 +107,7 @@ */ | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getWeekInfo | ||
*/ | ||
getWeekInfo(): any; | ||
/** | ||
* https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.weekInfo | ||
@@ -79,0 +114,0 @@ */ |
74
index.js
@@ -455,2 +455,9 @@ "use strict"; | ||
}); | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCalendars | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getCalendars | ||
*/ | ||
Locale.prototype.getCalendars = function () { | ||
return calendarsOfLocale(this); | ||
}; | ||
Object.defineProperty(Locale.prototype, "calendars", { | ||
@@ -466,2 +473,9 @@ /** | ||
}); | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCollations | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getCollations | ||
*/ | ||
Locale.prototype.getCollations = function () { | ||
return collationsOfLocale(this); | ||
}; | ||
Object.defineProperty(Locale.prototype, "collations", { | ||
@@ -477,2 +491,13 @@ /** | ||
}); | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getHourCycles | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getHourCycles | ||
*/ | ||
Locale.prototype.getHourCycles = function () { | ||
var locInternalSlots = (0, get_internal_slots_1.default)(this); | ||
if (locInternalSlots.initializedLocale === undefined) { | ||
throw new TypeError('Error uninitialized locale'); | ||
} | ||
return hourCyclesOfLocale(this); | ||
}; | ||
Object.defineProperty(Locale.prototype, "hourCycles", { | ||
@@ -488,2 +513,9 @@ /** | ||
}); | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getNumberingSystems | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getNumberingSystems | ||
*/ | ||
Locale.prototype.getNumberingSystems = function () { | ||
return numberingSystemsOfLocale(this); | ||
}; | ||
Object.defineProperty(Locale.prototype, "numberingSystems", { | ||
@@ -499,2 +531,9 @@ /** | ||
}); | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTimeZones | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getTimeZones | ||
*/ | ||
Locale.prototype.getTimeZones = function () { | ||
return timeZonesOfLocale(this); | ||
}; | ||
Object.defineProperty(Locale.prototype, "timeZones", { | ||
@@ -510,2 +549,14 @@ /** | ||
}); | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getTextInfo | ||
*/ | ||
Locale.prototype.getTextInfo = function () { | ||
var info = Object.create(Object.prototype); | ||
var dir = characterDirectionOfLocale(this); | ||
(0, ecma402_abstract_1.defineProperty)(info, 'direction', { | ||
value: dir, | ||
}); | ||
return info; | ||
}; | ||
Object.defineProperty(Locale.prototype, "textInfo", { | ||
@@ -534,2 +585,25 @@ /** | ||
}); | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getWeekInfo | ||
*/ | ||
Locale.prototype.getWeekInfo = function () { | ||
var info = Object.create(Object.prototype); | ||
var locInternalSlots = (0, get_internal_slots_1.default)(this); | ||
if (locInternalSlots.initializedLocale === undefined) { | ||
throw new TypeError('Error uninitialized locale'); | ||
} | ||
var wi = weekInfoOfLocale(this); | ||
var we = wi.weekend; | ||
(0, ecma402_abstract_1.defineProperty)(info, 'firstDay', { | ||
value: wi.firstDay, | ||
}); | ||
(0, ecma402_abstract_1.defineProperty)(info, 'weekend', { | ||
value: we, | ||
}); | ||
(0, ecma402_abstract_1.defineProperty)(info, 'minimalDays', { | ||
value: wi.minimalDays, | ||
}); | ||
return info; | ||
}; | ||
Object.defineProperty(Locale.prototype, "weekInfo", { | ||
@@ -536,0 +610,0 @@ /** |
@@ -47,2 +47,7 @@ export interface IntlLocaleOptions { | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCalendars | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getCalendars | ||
*/ | ||
getCalendars(): string[]; | ||
/** | ||
* https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.calendars | ||
@@ -52,2 +57,7 @@ */ | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCollations | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getCollations | ||
*/ | ||
getCollations(): string[]; | ||
/** | ||
* https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.collations | ||
@@ -57,2 +67,7 @@ */ | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getHourCycles | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getHourCycles | ||
*/ | ||
getHourCycles(): string[]; | ||
/** | ||
* https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.hourCycles | ||
@@ -62,2 +77,7 @@ */ | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getNumberingSystems | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getNumberingSystems | ||
*/ | ||
getNumberingSystems(): string[]; | ||
/** | ||
* https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.numberingSystems | ||
@@ -67,2 +87,7 @@ */ | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTimeZones | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getTimeZones | ||
*/ | ||
getTimeZones(): string[] | undefined; | ||
/** | ||
* https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.timeZones | ||
@@ -72,2 +97,7 @@ */ | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getTextInfo | ||
*/ | ||
getTextInfo(): any; | ||
/** | ||
* https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.textInfo | ||
@@ -77,2 +107,7 @@ */ | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getWeekInfo | ||
*/ | ||
getWeekInfo(): any; | ||
/** | ||
* https://tc39.es/proposal-intl-locale/#sec-Intl.Locale.prototype.weekInfo | ||
@@ -79,0 +114,0 @@ */ |
import { __assign, __spreadArray } from "tslib"; | ||
import { supportedValuesOf } from '@formatjs/intl-enumerator'; | ||
import { GetOption, invariant, SameValue, CoerceOptionsToObject, } from '@formatjs/ecma402-abstract'; | ||
import { defineProperty, GetOption, invariant, SameValue, CoerceOptionsToObject, } from '@formatjs/ecma402-abstract'; | ||
import { isStructurallyValidLanguageTag, isUnicodeLanguageSubtag, isUnicodeRegionSubtag, parseUnicodeLanguageId, isUnicodeScriptSubtag, emitUnicodeLocaleId, parseUnicodeLocaleId, emitUnicodeLanguageId, likelySubtags, } from '@formatjs/intl-getcanonicallocales'; | ||
@@ -452,2 +452,9 @@ import getInternalSlots from './get_internal_slots'; | ||
}); | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCalendars | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getCalendars | ||
*/ | ||
Locale.prototype.getCalendars = function () { | ||
return calendarsOfLocale(this); | ||
}; | ||
Object.defineProperty(Locale.prototype, "calendars", { | ||
@@ -463,2 +470,9 @@ /** | ||
}); | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCollations | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getCollations | ||
*/ | ||
Locale.prototype.getCollations = function () { | ||
return collationsOfLocale(this); | ||
}; | ||
Object.defineProperty(Locale.prototype, "collations", { | ||
@@ -474,2 +488,13 @@ /** | ||
}); | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getHourCycles | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getHourCycles | ||
*/ | ||
Locale.prototype.getHourCycles = function () { | ||
var locInternalSlots = getInternalSlots(this); | ||
if (locInternalSlots.initializedLocale === undefined) { | ||
throw new TypeError('Error uninitialized locale'); | ||
} | ||
return hourCyclesOfLocale(this); | ||
}; | ||
Object.defineProperty(Locale.prototype, "hourCycles", { | ||
@@ -485,2 +510,9 @@ /** | ||
}); | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getNumberingSystems | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getNumberingSystems | ||
*/ | ||
Locale.prototype.getNumberingSystems = function () { | ||
return numberingSystemsOfLocale(this); | ||
}; | ||
Object.defineProperty(Locale.prototype, "numberingSystems", { | ||
@@ -496,2 +528,9 @@ /** | ||
}); | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTimeZones | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getTimeZones | ||
*/ | ||
Locale.prototype.getTimeZones = function () { | ||
return timeZonesOfLocale(this); | ||
}; | ||
Object.defineProperty(Locale.prototype, "timeZones", { | ||
@@ -507,2 +546,14 @@ /** | ||
}); | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getTextInfo | ||
*/ | ||
Locale.prototype.getTextInfo = function () { | ||
var info = Object.create(Object.prototype); | ||
var dir = characterDirectionOfLocale(this); | ||
defineProperty(info, 'direction', { | ||
value: dir, | ||
}); | ||
return info; | ||
}; | ||
Object.defineProperty(Locale.prototype, "textInfo", { | ||
@@ -531,2 +582,25 @@ /** | ||
}); | ||
/** | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo | ||
* https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getWeekInfo | ||
*/ | ||
Locale.prototype.getWeekInfo = function () { | ||
var info = Object.create(Object.prototype); | ||
var locInternalSlots = getInternalSlots(this); | ||
if (locInternalSlots.initializedLocale === undefined) { | ||
throw new TypeError('Error uninitialized locale'); | ||
} | ||
var wi = weekInfoOfLocale(this); | ||
var we = wi.weekend; | ||
defineProperty(info, 'firstDay', { | ||
value: wi.firstDay, | ||
}); | ||
defineProperty(info, 'weekend', { | ||
value: we, | ||
}); | ||
defineProperty(info, 'minimalDays', { | ||
value: wi.minimalDays, | ||
}); | ||
return info; | ||
}; | ||
Object.defineProperty(Locale.prototype, "weekInfo", { | ||
@@ -533,0 +607,0 @@ /** |
{ | ||
"name": "@formatjs/intl-locale", | ||
"version": "3.3.2", | ||
"version": "3.3.3", | ||
"description": "Intl.Locale polyfill", | ||
@@ -27,7 +27,7 @@ "keywords": [ | ||
"dependencies": { | ||
"tslib": "^2.4.0", | ||
"@formatjs/ecma402-abstract": "1.17.0", | ||
"@formatjs/intl-enumerator": "1.3.2", | ||
"@formatjs/intl-getcanonicallocales": "2.2.1" | ||
"@formatjs/ecma402-abstract": "1.17.1", | ||
"@formatjs/intl-enumerator": "1.3.3", | ||
"@formatjs/intl-getcanonicallocales": "2.2.1", | ||
"tslib": "^2.4.0" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
796602
76
32731
+ Added@formatjs/ecma402-abstract@1.17.1(transitive)
+ Added@formatjs/intl-enumerator@1.3.3(transitive)
+ Added@formatjs/intl-localematcher@0.4.1(transitive)
- Removed@formatjs/ecma402-abstract@1.17.0(transitive)
- Removed@formatjs/intl-enumerator@1.3.2(transitive)
- Removed@formatjs/intl-localematcher@0.4.0(transitive)