@mdgascar/utils 0.7.0 → 0.9.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/README.md +4 -4
- package/dist/index.cjs +20 -20
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
Every mdg-utils module in one install: Malagasy number words, phone numbers, Ariary amounts
|
|
4
4
|
and dates.
|
|
5
5
|
|
|
6
|
-
Implements spec 0.
|
|
6
|
+
Implements spec 0.8.0.
|
|
7
7
|
|
|
8
8
|
```sh
|
|
9
9
|
npm install @mdgascar/utils
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```ts
|
|
13
|
-
import { formatAriary, formatDate,
|
|
13
|
+
import { formatAriary, formatDate, formatPhone, spell } from '@mdgascar/utils';
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
spell(21); // 'iraika amby roapolo'
|
|
16
|
+
formatPhone('0341234567', 'international'); // '+261 34 12 345 67'
|
|
17
17
|
formatAriary(1500); // 'Ar 1 500'
|
|
18
18
|
formatDate('2026-11-23', 'full'); // 'Alatsinainy 23 Novambra 2026'
|
|
19
19
|
```
|
package/dist/index.cjs
CHANGED
|
@@ -7,9 +7,9 @@ var date = require('@mdgascar/date');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
Object.defineProperty(exports, "
|
|
10
|
+
Object.defineProperty(exports, "spell", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return words.
|
|
12
|
+
get: function () { return words.spell; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "MdgError", {
|
|
15
15
|
enumerable: true,
|
|
@@ -23,34 +23,30 @@ Object.defineProperty(exports, "SPEC_VERSION", {
|
|
|
23
23
|
enumerable: true,
|
|
24
24
|
get: function () { return phone.SPEC_VERSION; }
|
|
25
25
|
});
|
|
26
|
-
Object.defineProperty(exports, "
|
|
26
|
+
Object.defineProperty(exports, "formatPhone", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return phone.
|
|
28
|
+
get: function () { return phone.formatPhone; }
|
|
29
29
|
});
|
|
30
|
-
Object.defineProperty(exports, "
|
|
30
|
+
Object.defineProperty(exports, "isValidPhone", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return phone.
|
|
32
|
+
get: function () { return phone.isValidPhone; }
|
|
33
33
|
});
|
|
34
|
-
Object.defineProperty(exports, "
|
|
34
|
+
Object.defineProperty(exports, "parsePhone", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return phone.
|
|
36
|
+
get: function () { return phone.parsePhone; }
|
|
37
37
|
});
|
|
38
|
-
Object.defineProperty(exports, "
|
|
38
|
+
Object.defineProperty(exports, "safeParsePhone", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return phone.
|
|
40
|
+
get: function () { return phone.safeParsePhone; }
|
|
41
41
|
});
|
|
42
|
-
Object.defineProperty(exports, "
|
|
42
|
+
Object.defineProperty(exports, "tryParsePhone", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return phone.
|
|
44
|
+
get: function () { return phone.tryParsePhone; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "ariaryToFmg", {
|
|
47
47
|
enumerable: true,
|
|
48
48
|
get: function () { return ariary.ariaryToFmg; }
|
|
49
49
|
});
|
|
50
|
-
Object.defineProperty(exports, "ariaryToWords", {
|
|
51
|
-
enumerable: true,
|
|
52
|
-
get: function () { return ariary.ariaryToWords; }
|
|
53
|
-
});
|
|
54
50
|
Object.defineProperty(exports, "fmgToAriary", {
|
|
55
51
|
enumerable: true,
|
|
56
52
|
get: function () { return ariary.fmgToAriary; }
|
|
@@ -71,6 +67,10 @@ Object.defineProperty(exports, "safeParseAriary", {
|
|
|
71
67
|
enumerable: true,
|
|
72
68
|
get: function () { return ariary.safeParseAriary; }
|
|
73
69
|
});
|
|
70
|
+
Object.defineProperty(exports, "spellAriary", {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
get: function () { return ariary.spellAriary; }
|
|
73
|
+
});
|
|
74
74
|
Object.defineProperty(exports, "tryParseAriary", {
|
|
75
75
|
enumerable: true,
|
|
76
76
|
get: function () { return ariary.tryParseAriary; }
|
|
@@ -79,13 +79,13 @@ Object.defineProperty(exports, "formatDate", {
|
|
|
79
79
|
enumerable: true,
|
|
80
80
|
get: function () { return date.formatDate; }
|
|
81
81
|
});
|
|
82
|
-
Object.defineProperty(exports, "
|
|
82
|
+
Object.defineProperty(exports, "monthName", {
|
|
83
83
|
enumerable: true,
|
|
84
|
-
get: function () { return date.
|
|
84
|
+
get: function () { return date.monthName; }
|
|
85
85
|
});
|
|
86
|
-
Object.defineProperty(exports, "
|
|
86
|
+
Object.defineProperty(exports, "weekdayName", {
|
|
87
87
|
enumerable: true,
|
|
88
|
-
get: function () { return date.
|
|
88
|
+
get: function () { return date.weekdayName; }
|
|
89
89
|
});
|
|
90
90
|
//# sourceMappingURL=index.cjs.map
|
|
91
91
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { ErrorCode, MdgError, OPERATOR_NAMES, OperatorId, PhoneNumber, PhoneNumberFormat, SPEC_VERSION, SafeParseResult,
|
|
3
|
-
export { AriaryDecimal, AriaryFormatOptions, AriaryGrouping, AriaryParseOptions, AriarySeparatorOptions, AriarySymbolPosition, ariaryToFmg,
|
|
4
|
-
export { CalendarDate, DateStyle, NameWidth, formatDate,
|
|
1
|
+
export { NumberSystem, SpellOptions, spell } from '@mdgascar/words';
|
|
2
|
+
export { ErrorCode, MdgError, OPERATOR_NAMES, OperatorId, PhoneNumber, PhoneNumberFormat, SPEC_VERSION, SafeParseResult, formatPhone, isValidPhone, parsePhone, safeParsePhone, tryParsePhone } from '@mdgascar/phone';
|
|
3
|
+
export { AriaryDecimal, AriaryFormatOptions, AriaryGrouping, AriaryParseOptions, AriarySeparatorOptions, AriarySymbolPosition, ariaryToFmg, fmgToAriary, formatAriary, formatFmg, parseAriary, safeParseAriary, spellAriary, tryParseAriary } from '@mdgascar/ariary';
|
|
4
|
+
export { CalendarDate, DateStyle, NameWidth, formatDate, monthName, weekdayName } from '@mdgascar/date';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { ErrorCode, MdgError, OPERATOR_NAMES, OperatorId, PhoneNumber, PhoneNumberFormat, SPEC_VERSION, SafeParseResult,
|
|
3
|
-
export { AriaryDecimal, AriaryFormatOptions, AriaryGrouping, AriaryParseOptions, AriarySeparatorOptions, AriarySymbolPosition, ariaryToFmg,
|
|
4
|
-
export { CalendarDate, DateStyle, NameWidth, formatDate,
|
|
1
|
+
export { NumberSystem, SpellOptions, spell } from '@mdgascar/words';
|
|
2
|
+
export { ErrorCode, MdgError, OPERATOR_NAMES, OperatorId, PhoneNumber, PhoneNumberFormat, SPEC_VERSION, SafeParseResult, formatPhone, isValidPhone, parsePhone, safeParsePhone, tryParsePhone } from '@mdgascar/phone';
|
|
3
|
+
export { AriaryDecimal, AriaryFormatOptions, AriaryGrouping, AriaryParseOptions, AriarySeparatorOptions, AriarySymbolPosition, ariaryToFmg, fmgToAriary, formatAriary, formatFmg, parseAriary, safeParseAriary, spellAriary, tryParseAriary } from '@mdgascar/ariary';
|
|
4
|
+
export { CalendarDate, DateStyle, NameWidth, formatDate, monthName, weekdayName } from '@mdgascar/date';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { MdgError, OPERATOR_NAMES, SPEC_VERSION,
|
|
3
|
-
export { ariaryToFmg,
|
|
4
|
-
export { formatDate,
|
|
1
|
+
export { spell } from '@mdgascar/words';
|
|
2
|
+
export { MdgError, OPERATOR_NAMES, SPEC_VERSION, formatPhone, isValidPhone, parsePhone, safeParsePhone, tryParsePhone } from '@mdgascar/phone';
|
|
3
|
+
export { ariaryToFmg, fmgToAriary, formatAriary, formatFmg, parseAriary, safeParseAriary, spellAriary, tryParseAriary } from '@mdgascar/ariary';
|
|
4
|
+
export { formatDate, monthName, weekdayName } from '@mdgascar/date';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mdgascar/utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Every mdg-utils module in one package: Malagasy number words, phone numbers, Ariary amounts and dates.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Mdgascar contributors",
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"provenance": true
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@mdgascar/
|
|
53
|
-
"@mdgascar/
|
|
54
|
-
"@mdgascar/
|
|
55
|
-
"@mdgascar/
|
|
52
|
+
"@mdgascar/ariary": "^0.9.0",
|
|
53
|
+
"@mdgascar/date": "^0.9.0",
|
|
54
|
+
"@mdgascar/words": "^0.9.0",
|
|
55
|
+
"@mdgascar/phone": "^0.9.0"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "tsup",
|