@fy-/fws-vue 2.3.40 → 2.3.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/composables/templating.ts +1 -15
- package/package.json +1 -1
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
import { getLocale } from '@fy-/fws-js'
|
|
2
|
-
import { format as formatDateTimeago
|
|
3
|
-
import * as timeagoLocales from 'timeago.js/lib/lang'
|
|
2
|
+
import { format as formatDateTimeago } from 'timeago.js'
|
|
4
3
|
import { useTranslation } from './translations'
|
|
5
4
|
|
|
6
|
-
// Register all available timeago.js locales
|
|
7
|
-
function registerTimeagoLocales() {
|
|
8
|
-
// Register all available locales from timeago.js
|
|
9
|
-
Object.entries(timeagoLocales).forEach(([locale, func]) => {
|
|
10
|
-
if (locale !== 'default' && typeof func === 'function') {
|
|
11
|
-
register(locale, func)
|
|
12
|
-
}
|
|
13
|
-
})
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// Register locales when this module is imported
|
|
17
|
-
registerTimeagoLocales()
|
|
18
|
-
|
|
19
5
|
// Cache common constants and patterns
|
|
20
6
|
const k = 1024
|
|
21
7
|
const byteSizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
|