UNPKG

515 BJavaScriptView Raw
1// For all locales added
2// their relative time formatter messages will be stored here.
3var localesData = {};
4export function getLocaleData(locale) {
5 return localesData[locale];
6}
7export function addLocaleData(localeData) {
8 if (!localeData) {
9 throw new Error('[javascript-time-ago] No locale data passed.');
10 } // This locale data is stored in a global variable
11 // and later used when calling `.format(time)`.
12
13
14 localesData[localeData.locale] = localeData;
15}
16//# sourceMappingURL=LocaleDataStore.js.map
\No newline at end of file