@basmilius/utils 2.9.6 → 2.11.0
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/dist/index.js.map +2 -2
- package/package.json +3 -3
- package/src/formatDate.ts +1 -1
- package/src/formatMonth.ts +1 -1
package/dist/index.js.map
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"export default function (url: string, filename: string): void {\n const anchor = document.createElement('a');\n anchor.download = filename;\n anchor.href = url;\n\n document.body.appendChild(anchor);\n anchor.click();\n document.body.removeChild(anchor);\n}\n",
|
|
11
11
|
"import downloadUrl from './downloadUrl';\n\nexport default function (blob: Blob, filename: string): void {\n const url = URL.createObjectURL(blob);\n downloadUrl(url, filename);\n URL.revokeObjectURL(url);\n}\n",
|
|
12
12
|
"import downloadBlob from './downloadBlob';\n\nexport default function (data: string, filename: string, type: string): void {\n const blob = new Blob([data], {type});\n downloadBlob(blob, filename);\n}\n",
|
|
13
|
-
"import type { DateTime } from 'luxon';\n\nexport default function (dateTime: DateTime): string {\n return dateTime.toLocaleString({\n year: 'numeric',\n month: 'long',\n day: 'numeric'
|
|
13
|
+
"import type { DateTime } from 'luxon';\n\nexport default function (dateTime: DateTime): string {\n return dateTime.toLocaleString({\n year: 'numeric',\n month: 'long',\n day: 'numeric'\n });\n}\n",
|
|
14
14
|
"import type { DateTime } from 'luxon';\n\nexport default function (dateTime: DateTime): string {\n return dateTime.toLocaleString({\n weekday: 'long',\n day: 'numeric',\n month: 'long'\n });\n}\n",
|
|
15
15
|
"import type { DateTime } from 'luxon';\n\nexport default function (dateTime: DateTime): string {\n return dateTime.toLocaleString({\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit'\n });\n}\n",
|
|
16
|
-
"import type { DateTime } from 'luxon';\n\nexport default function (dateTime: DateTime): string {\n return dateTime.toLocaleString({\n month: 'long'
|
|
16
|
+
"import type { DateTime } from 'luxon';\n\nexport default function (dateTime: DateTime): string {\n return dateTime.toLocaleString({\n month: 'long'\n });\n}\n",
|
|
17
17
|
"export default function (value: number, decimals: number = 0): string {\n const formatter = new Intl.NumberFormat(navigator.language, {\n maximumFractionDigits: decimals,\n minimumFractionDigits: decimals\n });\n\n return formatter.format(value);\n}\n",
|
|
18
18
|
"export default function (value: number): string {\n return new Intl.NumberFormat(navigator.language, {\n maximumFractionDigits: 1,\n minimumFractionDigits: 0,\n style: 'percent'\n }).format(value);\n}\n",
|
|
19
19
|
"import type { DateTime } from 'luxon';\n\nexport default function (dateTime: DateTime): string {\n return dateTime.toLocaleString({\n hour: '2-digit',\n minute: '2-digit'\n });\n}\n",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basmilius/utils",
|
|
3
3
|
"description": "Various utilities that are used in personal projects.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.11.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/basmilius",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"@types/luxon": "^3.7.1",
|
|
51
51
|
"luxon": "^3.7.2",
|
|
52
52
|
"pinia": "^3.0.3",
|
|
53
|
-
"vue": "^3.5.
|
|
53
|
+
"vue": "^3.5.22"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@basmilius/tools": "2.
|
|
56
|
+
"@basmilius/tools": "2.11.0"
|
|
57
57
|
}
|
|
58
58
|
}
|
package/src/formatDate.ts
CHANGED