@parischap/conversions 0.1.0 → 0.3.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.
Files changed (125) hide show
  1. package/README.md +50 -49
  2. package/cjs/BigDecimal.js +2 -2
  3. package/cjs/BigInt.js +7 -5
  4. package/cjs/BigInt.js.map +1 -1
  5. package/cjs/DateTime.js +144 -136
  6. package/cjs/DateTime.js.map +1 -1
  7. package/cjs/DateTimeFormat.js +7 -2
  8. package/cjs/DateTimeFormat.js.map +1 -1
  9. package/cjs/DateTimeFormatContext.js +11 -6
  10. package/cjs/DateTimeFormatContext.js.map +1 -1
  11. package/cjs/Email.js +11 -15
  12. package/cjs/Email.js.map +1 -1
  13. package/cjs/Integer.js +33 -23
  14. package/cjs/Integer.js.map +1 -1
  15. package/cjs/NumberBase10Format.js +65 -65
  16. package/cjs/PositiveInteger.js +44 -29
  17. package/cjs/PositiveInteger.js.map +1 -1
  18. package/cjs/PositiveReal.js +34 -24
  19. package/cjs/PositiveReal.js.map +1 -1
  20. package/cjs/Real.js +29 -18
  21. package/cjs/Real.js.map +1 -1
  22. package/cjs/RoundingMode.js +7 -4
  23. package/cjs/RoundingMode.js.map +1 -1
  24. package/cjs/RoundingOption.js +6 -6
  25. package/cjs/RoundingOption.js.map +1 -1
  26. package/cjs/Schema.js +29 -28
  27. package/cjs/Schema.js.map +1 -1
  28. package/cjs/SemVer.js +19 -20
  29. package/cjs/SemVer.js.map +1 -1
  30. package/cjs/Template.js +36 -31
  31. package/cjs/Template.js.map +1 -1
  32. package/cjs/TemplatePart.js +4 -4
  33. package/cjs/TemplateParts.js +3 -2
  34. package/cjs/TemplateParts.js.map +1 -1
  35. package/cjs/TemplatePlaceholder.js +56 -45
  36. package/cjs/TemplatePlaceholder.js.map +1 -1
  37. package/cjs/TemplateSeparator.js +17 -24
  38. package/cjs/TemplateSeparator.js.map +1 -1
  39. package/cjs/internal/Int.js +5 -8
  40. package/cjs/internal/Int.js.map +1 -1
  41. package/cjs/internal/Positive.js +5 -8
  42. package/cjs/internal/Positive.js.map +1 -1
  43. package/dts/BigDecimal.d.ts +2 -2
  44. package/dts/BigDecimal.d.ts.map +1 -1
  45. package/dts/BigInt.d.ts +7 -5
  46. package/dts/BigInt.d.ts.map +1 -1
  47. package/dts/DateTime.d.ts +145 -137
  48. package/dts/DateTime.d.ts.map +1 -1
  49. package/dts/DateTimeFormat.d.ts +7 -2
  50. package/dts/DateTimeFormat.d.ts.map +1 -1
  51. package/dts/DateTimeFormatContext.d.ts +17 -12
  52. package/dts/DateTimeFormatContext.d.ts.map +1 -1
  53. package/dts/Email.d.ts +16 -13
  54. package/dts/Email.d.ts.map +1 -1
  55. package/dts/Integer.d.ts +43 -21
  56. package/dts/Integer.d.ts.map +1 -1
  57. package/dts/NumberBase10Format.d.ts +68 -68
  58. package/dts/PositiveInteger.d.ts +54 -27
  59. package/dts/PositiveInteger.d.ts.map +1 -1
  60. package/dts/PositiveReal.d.ts +44 -22
  61. package/dts/PositiveReal.d.ts.map +1 -1
  62. package/dts/Real.d.ts +39 -16
  63. package/dts/Real.d.ts.map +1 -1
  64. package/dts/RoundingMode.d.ts +6 -3
  65. package/dts/RoundingMode.d.ts.map +1 -1
  66. package/dts/RoundingOption.d.ts +6 -6
  67. package/dts/Schema.d.ts +32 -33
  68. package/dts/Schema.d.ts.map +1 -1
  69. package/dts/SemVer.d.ts +25 -13
  70. package/dts/SemVer.d.ts.map +1 -1
  71. package/dts/Template.d.ts +30 -29
  72. package/dts/Template.d.ts.map +1 -1
  73. package/dts/TemplatePart.d.ts +4 -4
  74. package/dts/TemplateParts.d.ts +4 -3
  75. package/dts/TemplateParts.d.ts.map +1 -1
  76. package/dts/TemplatePlaceholder.d.ts +56 -44
  77. package/dts/TemplatePlaceholder.d.ts.map +1 -1
  78. package/dts/TemplateSeparator.d.ts +9 -51
  79. package/dts/TemplateSeparator.d.ts.map +1 -1
  80. package/dts/internal/Int.d.ts +0 -4
  81. package/dts/internal/Int.d.ts.map +1 -1
  82. package/dts/internal/Positive.d.ts +0 -4
  83. package/dts/internal/Positive.d.ts.map +1 -1
  84. package/esm/BigDecimal.js +2 -2
  85. package/esm/BigInt.js +7 -5
  86. package/esm/BigInt.js.map +1 -1
  87. package/esm/DateTime.js +144 -136
  88. package/esm/DateTime.js.map +1 -1
  89. package/esm/DateTimeFormat.js +7 -2
  90. package/esm/DateTimeFormat.js.map +1 -1
  91. package/esm/DateTimeFormatContext.js +11 -6
  92. package/esm/DateTimeFormatContext.js.map +1 -1
  93. package/esm/Email.js +10 -13
  94. package/esm/Email.js.map +1 -1
  95. package/esm/Integer.js +33 -23
  96. package/esm/Integer.js.map +1 -1
  97. package/esm/NumberBase10Format.js +65 -65
  98. package/esm/PositiveInteger.js +44 -29
  99. package/esm/PositiveInteger.js.map +1 -1
  100. package/esm/PositiveReal.js +34 -24
  101. package/esm/PositiveReal.js.map +1 -1
  102. package/esm/Real.js +29 -18
  103. package/esm/Real.js.map +1 -1
  104. package/esm/RoundingMode.js +6 -3
  105. package/esm/RoundingMode.js.map +1 -1
  106. package/esm/RoundingOption.js +6 -6
  107. package/esm/RoundingOption.js.map +1 -1
  108. package/esm/Schema.js +33 -34
  109. package/esm/Schema.js.map +1 -1
  110. package/esm/SemVer.js +18 -18
  111. package/esm/SemVer.js.map +1 -1
  112. package/esm/Template.js +36 -31
  113. package/esm/Template.js.map +1 -1
  114. package/esm/TemplatePart.js +4 -4
  115. package/esm/TemplateParts.js +3 -2
  116. package/esm/TemplateParts.js.map +1 -1
  117. package/esm/TemplatePlaceholder.js +55 -44
  118. package/esm/TemplatePlaceholder.js.map +1 -1
  119. package/esm/TemplateSeparator.js +16 -24
  120. package/esm/TemplateSeparator.js.map +1 -1
  121. package/esm/internal/Int.js +5 -7
  122. package/esm/internal/Int.js.map +1 -1
  123. package/esm/internal/Positive.js +5 -7
  124. package/esm/internal/Positive.js.map +1 -1
  125. package/package.json +2 -2
package/esm/Integer.js CHANGED
@@ -1,6 +1,8 @@
1
1
  /**
2
- * This module implements a finite integer brand (Infinity, NaN or non-null fractional part
3
- * disallowed)
2
+ * This module implements a CVInteger brand, i.e. a number that represents an integer (Infinity, NaN
3
+ * disallowed). Can be used to represent a floor in a lift, a signed quantity... See the `Effect`
4
+ * documentation about Branding (https://effect.website/docs/code-style/branded-types/) if you are
5
+ * not familiar with this concept.
4
6
  */
5
7
  import { Brand, Either, flow, Function, Option, Schema } from 'effect';
6
8
  import * as CVInt from './internal/Int.js';
@@ -14,115 +16,123 @@ export const moduleTag = '@parischap/conversions/Integer/';
14
16
  /**
15
17
  * Brand constructor. Should not be used directly
16
18
  *
17
- * @category Constructors
19
+ * @ignore
18
20
  */
19
21
  export const constructor = /*#__PURE__*/Brand.all(CVReal.constructor, CVInt.constructor);
20
22
  /**
21
- * Constructs an Integer from a number without any verifications
23
+ * Constructs a `CVInteger` from a number without any verifications
22
24
  *
23
25
  * @category Constructors
24
26
  */
25
27
  export const unsafeFromNumber = /*#__PURE__*/Brand.nominal();
26
28
  /**
27
- * Constructs an Option of an Integer from a number
29
+ * Tries to construct a `CVInteger` from a number. Returns a `Some` if the conversion can be
30
+ * performed, a `None` otherwise
28
31
  *
29
32
  * @category Constructors
30
33
  */
31
34
  export const fromNumberOption = /*#__PURE__*/constructor.option.bind(constructor);
32
35
  /**
33
- * Constructs an Either of an Integer from a number
36
+ * Tries to construct a `CVnteger` from a number. Returns a `Right` if the conversion can be
37
+ * performed, a `Left` otherwise
34
38
  *
35
39
  * @category Constructors
36
40
  */
37
41
  export const fromNumber = /*#__PURE__*/constructor.either.bind(constructor);
38
42
  /**
39
- * Constructs an Integer from a number or throws
43
+ * Constructs a `CVInteger` from a number if possible. Throws otherwise
40
44
  *
41
45
  * @category Constructors
42
46
  */
43
47
  export const fromNumberOrThrow = constructor;
44
48
  /**
45
- * Constructs an Integer from a BigDecimal without any checks
49
+ * Constructs a `CVInteger` from a `BigDecimal` without any checks
46
50
  *
47
51
  * @category Constructors
48
52
  */
49
53
  export const unsafeFromBigDecimal = CVReal.unsafeFromBigDecimal;
50
54
  /**
51
- * Constructs an Option of an Integer from a BigDecimal
55
+ * Tries to construct a `CVInteger` from a `BigDecimal`. Returns a `Some` if the conversion can be
56
+ * performed, a `None` otherwise
52
57
  *
53
58
  * @category Constructors
54
59
  */
55
60
  export const fromBigDecimalOption = /*#__PURE__*/flow(CVReal.fromBigDecimalOption, /*#__PURE__*/Option.flatMap(CVInt.fromNumberOption));
56
61
  /**
57
- * Constructs an Either of an Integer from a BigDecimal
62
+ * Tries to construct a `CVInteger` from a `BigDecimal`. Returns a `Right` if the conversion can be
63
+ * performed, a `Left` otherwise
58
64
  *
59
65
  * @category Constructors
60
66
  */
61
67
  export const fromBigDecimal = /*#__PURE__*/flow(CVReal.fromBigDecimal, /*#__PURE__*/Either.flatMap(CVInt.fromNumber));
62
68
  /**
63
- * Constructs an Integer from a BigDecimal or throws
69
+ * Constructs a `CVInteger` from a `BigDecimal` if possible. Throws otherwise
64
70
  *
65
71
  * @category Constructors
66
72
  */
67
73
  export const fromBigDecimalOrThrow = /*#__PURE__*/flow(CVReal.fromBigDecimalOrThrow, CVInt.fromNumberOrThrow);
68
74
  /**
69
- * Constructs an Integer from a BigInt without any checks
75
+ * Constructs a `CVInteger` from a `BigInt` without any checks
70
76
  *
71
77
  * @category Constructors
72
78
  */
73
79
  export const unsafeFromBigInt = CVReal.unsafeFromBigInt;
74
80
  /**
75
- * Constructs an Option of an Integer from a BigInt
81
+ * Tries to construct a `CVInteger` from a `BigInt`. Returns a `Some` if the conversion can be
82
+ * performed, a `None` otherwise
76
83
  *
77
84
  * @category Constructors
78
85
  */
79
86
  export const fromBigIntOption = /*#__PURE__*/flow(CVReal.fromBigIntOption);
80
87
  /**
81
- * Constructs an Either of an Integer from a BigInt
88
+ * Tries to construct a `CVInteger` from a `BigInt`. Returns a `Right` if the conversion can be
89
+ * performed, a `Left` otherwise
82
90
  *
83
91
  * @category Constructors
84
92
  */
85
93
  export const fromBigInt = /*#__PURE__*/flow(CVReal.fromBigInt, /*#__PURE__*/Either.flatMap(CVInt.fromNumber));
86
94
  /**
87
- * Constructs an Integer from a BigInt or throws
95
+ * Constructs a `CVInteger` from a `BigInt` if possible. Throws otherwise
88
96
  *
89
97
  * @category Constructors
90
98
  */
91
99
  export const fromBigIntOrThrow = /*#__PURE__*/flow(CVReal.fromBigIntOrThrow);
92
100
  /**
93
- * Constructs an Integer from a Real without any checks
101
+ * Constructs a `CVInteger` from a `CVReal` without any checks
94
102
  *
95
103
  * @category Constructors
96
104
  */
97
105
  export const unsafeFromReal = Function.identity;
98
106
  /**
99
- * Constructs an Option of an Integer from a Real
107
+ * Tries to construct a `CVInteger` from a `CVReal`. Returns a `Some` if the conversion can be
108
+ * performed, a `None` otherwise
100
109
  *
101
110
  * @category Constructors
102
111
  */
103
112
  export const fromRealOption = CVInt.fromNumberOption;
104
113
  /**
105
- * Constructs an Either of an Integer from a Real
114
+ * Tries to construct a `CVInteger` from a `CVReal`. Returns a `Right` if the conversion can be
115
+ * performed, a `Left` otherwise
106
116
  *
107
117
  * @category Constructors
108
118
  */
109
119
  export const fromReal = CVInt.fromNumber;
110
120
  /**
111
- * Constructs an Integer from a Real or throws
121
+ * Constructs a `CVInteger` from a `CVReal` if possible. Throws otherwise
112
122
  *
113
123
  * @category Constructors
114
124
  */
115
125
  export const fromRealOrThrow = CVInt.fromNumberOrThrow;
116
126
  /**
117
- * A Schema that transforms a number into a CVInteger.Type
127
+ * A `Schema` that transforms a number into a `CVInteger`
118
128
  *
119
- * @internal
129
+ * @ignore
120
130
  */
121
131
  export const SchemaFromNumber = /*#__PURE__*/Schema.Number.pipe(/*#__PURE__*/Schema.fromBrand(constructor));
122
132
  /**
123
- * A Schema that represents a CVInteger.Type
133
+ * A `Schema` that represents a `CVInteger`
124
134
  *
125
- * @internal
135
+ * @ignore
126
136
  */
127
137
  export const SchemaFromSelf = /*#__PURE__*/Schema.typeSchema(SchemaFromNumber);
128
138
  //# sourceMappingURL=Integer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Integer.js","names":["Brand","Either","flow","Function","Option","Schema","CVInt","CVReal","moduleTag","constructor","all","unsafeFromNumber","nominal","fromNumberOption","option","bind","fromNumber","either","fromNumberOrThrow","unsafeFromBigDecimal","fromBigDecimalOption","flatMap","fromBigDecimal","fromBigDecimalOrThrow","unsafeFromBigInt","fromBigIntOption","fromBigInt","fromBigIntOrThrow","unsafeFromReal","identity","fromRealOption","fromReal","fromRealOrThrow","SchemaFromNumber","Number","pipe","fromBrand","SchemaFromSelf","typeSchema"],"sources":["../../esm/Integer.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;AAMA,SAAqBA,KAAK,EAAEC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,MAAM,QAAQ,QAAQ;AAClF,OAAO,KAAKC,KAAK,MAAM,mBAAmB;AAC1C,OAAO,KAAKC,MAAM,MAAM,WAAW;AAEnC;;;;;AAKA,OAAO,MAAMC,SAAS,GAAG,iCAAiC;AAE1D;;;;;AAKA,OAAO,MAAMC,WAAW,gBAAGT,KAAK,CAACU,GAAG,CAACH,MAAM,CAACE,WAAW,EAAEH,KAAK,CAACG,WAAW,CAAC;AAS3E;;;;;AAKA,OAAO,MAAME,gBAAgB,gBAAGX,KAAK,CAACY,OAAO,EAAQ;AAErD;;;;;AAKA,OAAO,MAAMC,gBAAgB,gBAGzBJ,WAAW,CAACK,MAAM,CAACC,IAAI,CAACN,WAAW,CAAC;AAExC;;;;;AAKA,OAAO,MAAMO,UAAU,gBAGnBP,WAAW,CAACQ,MAAM,CAACF,IAAI,CAACN,WAAW,CAAC;AAExC;;;;;AAKA,OAAO,MAAMS,iBAAiB,GAAwCT,WAAW;AAEjF;;;;;AAKA,OAAO,MAAMU,oBAAoB,GAChCZ,MAAM,CAACY,oBAA6B;AAErC;;;;;AAKA,OAAO,MAAMC,oBAAoB,gBAG7BlB,IAAI,CAACK,MAAM,CAACa,oBAAoB,eAAEhB,MAAM,CAACiB,OAAO,CAACf,KAAK,CAACO,gBAAgB,CAAC,CAAU;AAEtF;;;;;AAKA,OAAO,MAAMS,cAAc,gBAGvBpB,IAAI,CAACK,MAAM,CAACe,cAAc,eAAErB,MAAM,CAACoB,OAAO,CAACf,KAAK,CAACU,UAAU,CAAC,CAAU;AAE1E;;;;;AAKA,OAAO,MAAMO,qBAAqB,gBAAuDrB,IAAI,CAC5FK,MAAM,CAACgB,qBAAqB,EAC5BjB,KAAK,CAACY,iBAAiB,CACd;AAEV;;;;;AAKA,OAAO,MAAMM,gBAAgB,GAC5BjB,MAAM,CAACiB,gBAAyB;AAEjC;;;;;AAKA,OAAO,MAAMC,gBAAgB,gBAAuDvB,IAAI,CACvFK,MAAM,CAACkB,gBAAgB,CACd;AAEV;;;;;AAKA,OAAO,MAAMC,UAAU,gBAGnBxB,IAAI,CAACK,MAAM,CAACmB,UAAU,eAAEzB,MAAM,CAACoB,OAAO,CAACf,KAAK,CAACU,UAAU,CAAC,CAAU;AAEtE;;;;;AAKA,OAAO,MAAMW,iBAAiB,gBAAwCzB,IAAI,CACzEK,MAAM,CAACoB,iBAAiB,CACf;AAEV;;;;;AAKA,OAAO,MAAMC,cAAc,GAA6CzB,QAAQ,CAAC0B,QAAiB;AAElG;;;;;AAKA,OAAO,MAAMC,cAAc,GAGvBxB,KAAK,CAACO,gBAAyB;AAEnC;;;;;AAKA,OAAO,MAAMkB,QAAQ,GAGjBzB,KAAK,CAACU,UAAmB;AAE7B;;;;;AAKA,OAAO,MAAMgB,eAAe,GAC3B1B,KAAK,CAACY,iBAA0B;AAEjC;;;;;AAKA,OAAO,MAAMe,gBAAgB,gBAAgC5B,MAAM,CAAC6B,MAAM,CAACC,IAAI,cAC9E9B,MAAM,CAAC+B,SAAS,CAAC3B,WAAW,CAAC,CAC7B;AAED;;;;;AAKA,OAAO,MAAM4B,cAAc,gBAAwBhC,MAAM,CAACiC,UAAU,CAACL,gBAAgB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Integer.js","names":["Brand","Either","flow","Function","Option","Schema","CVInt","CVReal","moduleTag","constructor","all","unsafeFromNumber","nominal","fromNumberOption","option","bind","fromNumber","either","fromNumberOrThrow","unsafeFromBigDecimal","fromBigDecimalOption","flatMap","fromBigDecimal","fromBigDecimalOrThrow","unsafeFromBigInt","fromBigIntOption","fromBigInt","fromBigIntOrThrow","unsafeFromReal","identity","fromRealOption","fromReal","fromRealOrThrow","SchemaFromNumber","Number","pipe","fromBrand","SchemaFromSelf","typeSchema"],"sources":["../../esm/Integer.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;AAQA,SAAqBA,KAAK,EAAEC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,MAAM,QAAQ,QAAQ;AAClF,OAAO,KAAKC,KAAK,MAAM,mBAAmB;AAC1C,OAAO,KAAKC,MAAM,MAAM,WAAW;AAEnC;;;;;AAKA,OAAO,MAAMC,SAAS,GAAG,iCAAiC;AAE1D;;;;;AAKA,OAAO,MAAMC,WAAW,gBAAGT,KAAK,CAACU,GAAG,CAACH,MAAM,CAACE,WAAW,EAAEH,KAAK,CAACG,WAAW,CAAC;AAS3E;;;;;AAKA,OAAO,MAAME,gBAAgB,gBAAGX,KAAK,CAACY,OAAO,EAAQ;AAErD;;;;;;AAMA,OAAO,MAAMC,gBAAgB,gBAGzBJ,WAAW,CAACK,MAAM,CAACC,IAAI,CAACN,WAAW,CAAC;AAExC;;;;;;AAMA,OAAO,MAAMO,UAAU,gBAGnBP,WAAW,CAACQ,MAAM,CAACF,IAAI,CAACN,WAAW,CAAC;AAExC;;;;;AAKA,OAAO,MAAMS,iBAAiB,GAAwCT,WAAW;AAEjF;;;;;AAKA,OAAO,MAAMU,oBAAoB,GAChCZ,MAAM,CAACY,oBAA6B;AAErC;;;;;;AAMA,OAAO,MAAMC,oBAAoB,gBAG7BlB,IAAI,CAACK,MAAM,CAACa,oBAAoB,eAAEhB,MAAM,CAACiB,OAAO,CAACf,KAAK,CAACO,gBAAgB,CAAC,CAAU;AAEtF;;;;;;AAMA,OAAO,MAAMS,cAAc,gBAGvBpB,IAAI,CAACK,MAAM,CAACe,cAAc,eAAErB,MAAM,CAACoB,OAAO,CAACf,KAAK,CAACU,UAAU,CAAC,CAAU;AAE1E;;;;;AAKA,OAAO,MAAMO,qBAAqB,gBAAuDrB,IAAI,CAC5FK,MAAM,CAACgB,qBAAqB,EAC5BjB,KAAK,CAACY,iBAAiB,CACd;AAEV;;;;;AAKA,OAAO,MAAMM,gBAAgB,GAC5BjB,MAAM,CAACiB,gBAAyB;AAEjC;;;;;;AAMA,OAAO,MAAMC,gBAAgB,gBAAuDvB,IAAI,CACvFK,MAAM,CAACkB,gBAAgB,CACd;AAEV;;;;;;AAMA,OAAO,MAAMC,UAAU,gBAGnBxB,IAAI,CAACK,MAAM,CAACmB,UAAU,eAAEzB,MAAM,CAACoB,OAAO,CAACf,KAAK,CAACU,UAAU,CAAC,CAAU;AAEtE;;;;;AAKA,OAAO,MAAMW,iBAAiB,gBAAwCzB,IAAI,CACzEK,MAAM,CAACoB,iBAAiB,CACf;AAEV;;;;;AAKA,OAAO,MAAMC,cAAc,GAA6CzB,QAAQ,CAAC0B,QAAiB;AAElG;;;;;;AAMA,OAAO,MAAMC,cAAc,GAGvBxB,KAAK,CAACO,gBAAyB;AAEnC;;;;;;AAMA,OAAO,MAAMkB,QAAQ,GAGjBzB,KAAK,CAACU,UAAmB;AAE7B;;;;;AAKA,OAAO,MAAMgB,eAAe,GAC3B1B,KAAK,CAACY,iBAA0B;AAEjC;;;;;AAKA,OAAO,MAAMe,gBAAgB,gBAAgC5B,MAAM,CAAC6B,MAAM,CAACC,IAAI,cAC9E9B,MAAM,CAAC+B,SAAS,CAAC3B,WAAW,CAAC,CAC7B;AAED;;;;;AAKA,OAAO,MAAM4B,cAAc,gBAAwBhC,MAAM,CAACiC,UAAU,CAACL,gBAAgB,CAAC","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  /**
2
- * This module implements conversions from number to string and string to number in base-10
3
- * notation.
2
+ * This module implements a `CVNumberBase10Format` which describes the possible options to
3
+ * format/parse a base-10 number or `BigDecimal` and implements the formatting/parsing algortithms
4
4
  */
5
5
  import { MBigDecimal, MBigInt, MFunction, MInspectable, MMatch, MNumber, MPipeable, MPredicate, MRegExpString, MString, MStruct, MTypes } from '@parischap/effect-lib';
6
6
  import { Array, BigDecimal, BigInt, Either, flow, Function, Number, Option, pipe, Predicate, String, Struct, Tuple } from 'effect';
@@ -15,7 +15,7 @@ import * as CVRoundingOption from './RoundingOption.js';
15
15
  export const moduleTag = '@parischap/conversions/NumberBase10Format/';
16
16
  const _TypeId = /*#__PURE__*/Symbol.for(moduleTag);
17
17
  /**
18
- * Possible sign display options
18
+ * Type that represents the possible sign display options
19
19
  *
20
20
  * @category Models
21
21
  */
@@ -93,7 +93,7 @@ export var SignDisplay;
93
93
  }) => isZero || sign === 1 ? '' : '-'), /*#__PURE__*/MMatch.whenIs(SignDisplay.Never, () => MFunction.constEmptyString), MMatch.exhaustive);
94
94
  })(SignDisplay || (SignDisplay = {}));
95
95
  /**
96
- * Possible scientific notation options
96
+ * Type that represents the possible scientific notation options
97
97
  *
98
98
  * @category Models
99
99
  */
@@ -132,7 +132,7 @@ export var ScientificNotation;
132
132
  ScientificNotation[ScientificNotation["Engineering"] = 3] = "Engineering";
133
133
  })(ScientificNotation || (ScientificNotation = {}));
134
134
  /**
135
- * Namespace for possible scientific notation options
135
+ * ScientificNotation namespace
136
136
  *
137
137
  * @category Models
138
138
  */
@@ -244,7 +244,7 @@ export const roundingMode = /*#__PURE__*/Struct.get('roundingMode');
244
244
  */
245
245
  export const signDisplay = /*#__PURE__*/Struct.get('signDisplay');
246
246
  /**
247
- * Returns a short description of `self`
247
+ * Returns a short description of `self`, e.g. 'signed integer'
248
248
  *
249
249
  * @category Destructors
250
250
  */
@@ -297,40 +297,40 @@ const _toBigDecimalExtractor = (self, fillChar = '') => {
297
297
  /**
298
298
  * Returns a function that tries to parse, from the start of a string `text`, a number respecting
299
299
  * the options represented by `self` and an optional `fillChar` parameter. If successful, that
300
- * function returns a `some` containing `parsedText` (the part of `text` that could be analyzed as
300
+ * function returns a `Some` containing `parsedText` (the part of `text` that could be analyzed as
301
301
  * representing a number) and `value` (`parsedText` converted to a BigDecimal value). Otherwise, it
302
- * returns a `none`. As there is no way to distinguish `-0n` and `0n` in Javascript, parsing '-0',
303
- * '0', '+0' will yield the same result.
302
+ * returns a `None`. As `BigDecimal`'s provide no possibility to distinguish `-0n` and `0n`, parsing
303
+ * '-0', '0', '+0' will yield the same result.
304
304
  *
305
305
  * `fillChar` is a character that may be used as filler between the sign and the number (or at the
306
306
  * start of the number if it is unsigned). It must be a one-character string (but no error is
307
- * triggered if it's not). You can use '0' as `fillChar` but you shoud not use any other digit
307
+ * triggered if it's not). You can use '0' as `fillChar` but you should not use any other digit
308
308
  * because the value of the number to parse would depend on the number of removed `fillChar`'s.
309
309
  *
310
310
  * @category Parsing
311
311
  */
312
312
  export const toBigDecimalExtractor = /*#__PURE__*/flow(_toBigDecimalExtractor, /*#__PURE__*/Function.compose(/*#__PURE__*/Option.map(([value, parsedText, sign]) => Tuple.make(BigDecimal.multiply(value, BigDecimal.unsafeFromNumber(sign)), parsedText))));
313
313
  /**
314
- * Same as toBigDecimalExtractor but the returned parser throws in case of error
314
+ * Same as `toBigDecimalExtractor` but the returned parser throws in case of failure
315
315
  *
316
316
  * @category Parsing
317
317
  */
318
318
  export const toThrowingBigDecimalExtractor = (self, fillChar) => text => pipe(text, toBigDecimalExtractor(self, fillChar), Option.getOrThrowWith(() => new Error(`A BigDecimal could not be parsed from the start of '${text}'`)));
319
319
  /**
320
- * Same as `toBigDecimalExtractor` but returns a `Real` which is the most usual use case.
321
- * Furthermore, this function will return -0 if your parse '-0' and 0 if you parse '0' or '+0'.
320
+ * Same as `toBigDecimalExtractor` but returns a `CVReal`. This is the most usual use case.
321
+ * Furthermore, this function will return `-0` if your parse '-0' and `0` if you parse '0' or '+0'.
322
322
  *
323
323
  * @category Parsing
324
324
  */
325
325
  export const toRealExtractor = /*#__PURE__*/flow(_toBigDecimalExtractor, /*#__PURE__*/Function.compose(/*#__PURE__*/Option.flatMap(([value, parsedText, sign]) => pipe(value, CVReal.fromBigDecimalOption, Option.map(flow(Number.multiply(sign), Tuple.make, Tuple.appendElement(parsedText)))))));
326
326
  /**
327
- * Same as toRealExtractor but the returned parser throws in case of error
327
+ * Same as `toRealExtractor` but the returned parser throws in case of failure
328
328
  *
329
329
  * @category Parsing
330
330
  */
331
331
  export const toThrowingRealExtractor = (self, fillChar) => text => pipe(text, toRealExtractor(self, fillChar), Option.getOrThrowWith(() => new Error(`A Real could not be parsed from the start of '${text}'`)));
332
332
  /**
333
- * Same as toBigDecimalExtractor but the whole of the input text must represent a number, not just
333
+ * Same as `toBigDecimalExtractor` but the whole of the input text must represent a number, not just
334
334
  * its start
335
335
  *
336
336
  * @category Parsing
@@ -340,7 +340,7 @@ export const toBigDecimalParser = (self, fillChar) => {
340
340
  return text => pipe(text, extractor, Option.flatMap(flow(Option.liftPredicate(flow(Tuple.getSecond, String.length, MPredicate.strictEquals(text.length))), Option.map(Tuple.getFirst))));
341
341
  };
342
342
  /**
343
- * Same as toRealExtractor but the returned parser throws in case of error
343
+ * Same as `toBigDecimalParser` but the returned parser throws in case of failure
344
344
  *
345
345
  * @category Parsing
346
346
  */
@@ -356,16 +356,16 @@ export const toRealParser = (self, fillChar) => {
356
356
  return text => pipe(text, extractor, Option.flatMap(flow(Option.liftPredicate(flow(Tuple.getSecond, String.length, MPredicate.strictEquals(text.length))), Option.map(Tuple.getFirst))));
357
357
  };
358
358
  /**
359
- * Same as toRealParser but the returned parser throws in case of error
359
+ * Same as `toRealParser` but the returned parser throws in case of failure
360
360
  *
361
361
  * @category Parsing
362
362
  */
363
363
  export const toThrowingRealParser = (self, fillChar) => text => pipe(text, toRealParser(self, fillChar), Option.getOrThrowWith(() => new Error(`A Real could not be parsed from '${text}'`)));
364
364
  /**
365
365
  * Returns a function that tries to format a `number` respecting the options represented by
366
- * `self`and an optional parameter `fillChars`. If successful, that function returns a `some` of the
367
- * formatted number. Otherwise, it returns a `none`. `number` can be of type number or BigDecimal
368
- * for better accuracy. There is a difference between number and BigDecimal (and bigint) regarding
366
+ * `self`and an optional parameter `fillChars`. If successful, that function returns a `Some` of the
367
+ * formatted number. Otherwise, it returns a `None`. `number` can be of type number or `BigDecimal`
368
+ * for better accuracy. There is a difference between number and `BigDecimal` (and bigint) regarding
369
369
  * the sign of 0. In Javascript, Object.is(0,-0) is false whereas Object.is(0n,-0n) is true. So if
370
370
  * the sign of zero is important to you, prefer passing a number to the function. `0` as a
371
371
  * BigDecimal will always be interpreted as a positive `0` as we have no means of knowing if it is
@@ -413,8 +413,8 @@ export const toNumberFormatter = (self, fillChars = '') => {
413
413
  };
414
414
  };
415
415
  /**
416
- * Combinator that returns a copy of self with `minimumFractionalDigits` and
417
- * `maximumFractionalDigits` set to `n`. `n` must be a finite positive integer.
416
+ * Returns a copy of `self` with `minimumFractionalDigits` and `maximumFractionalDigits` set to `n`.
417
+ * `n` must be a finite positive integer
418
418
  *
419
419
  * @category Modifiers
420
420
  */
@@ -423,8 +423,8 @@ export const withNDecimals = decimalNumber => flow(MStruct.append({
423
423
  maximumFractionalDigits: decimalNumber
424
424
  }), make);
425
425
  /**
426
- * Combinator that returns a copy of self with `maximumFractionalDigits` set to `n`. `n` must be a
427
- * positive integer. Pass 0 for an integer format.
426
+ * Returns a copy of `self` with `maximumFractionalDigits` set to `n`. `n` must be a positive
427
+ * integer (`+Infinity` allowed). Pass 0 for an integer format
428
428
  *
429
429
  * @category Modifiers
430
430
  */
@@ -433,8 +433,8 @@ export const withMaxNDecimals = maxDecimalNumber => self => pipe(self, MStruct.a
433
433
  maximumFractionalDigits: maxDecimalNumber
434
434
  }), make);
435
435
  /**
436
- * Combinator that returns a copy of self with `minimumFractionalDigits` set to `n`. `n` must be a
437
- * finite positive integer.
436
+ * Returns a copy of `self` with `minimumFractionalDigits` set to `n`. `n` must be a finite positive
437
+ * integer
438
438
  *
439
439
  * @category Modifiers
440
440
  */
@@ -443,7 +443,7 @@ export const withMinNDecimals = minDecimalNumber => self => pipe(self, MStruct.a
443
443
  maximumFractionalDigits: Math.max(self.maximumFractionalDigits, minDecimalNumber)
444
444
  }), make);
445
445
  /**
446
- * Combinator that returns a copy of self with `scientificNotation` set to `None`.
446
+ * Returns a copy of `self` with `scientificNotation` set to `None`
447
447
  *
448
448
  * @category Modifiers
449
449
  */
@@ -451,7 +451,7 @@ export const withNoScientificNotation = /*#__PURE__*/flow(/*#__PURE__*/MStruct.a
451
451
  scientificNotation: ScientificNotation.None
452
452
  }), make);
453
453
  /**
454
- * Combinator that returns a copy of self with `scientificNotation` set to `Standard`.
454
+ * Returns a copy of `self` with `scientificNotation` set to `Standard`
455
455
  *
456
456
  * @category Modifiers
457
457
  */
@@ -459,7 +459,7 @@ export const withStandardScientificNotation = /*#__PURE__*/flow(/*#__PURE__*/MSt
459
459
  scientificNotation: ScientificNotation.Standard
460
460
  }), make);
461
461
  /**
462
- * Combinator that returns a copy of self with `scientificNotation` set to `Normalized`.
462
+ * Returns a copy of `self` with `scientificNotation` set to `Normalized`
463
463
  *
464
464
  * @category Modifiers
465
465
  */
@@ -467,7 +467,7 @@ export const withNormalizedScientificNotation = /*#__PURE__*/flow(/*#__PURE__*/M
467
467
  scientificNotation: ScientificNotation.Normalized
468
468
  }), make);
469
469
  /**
470
- * Combinator that returns a copy of self with `scientificNotation` set to `Engineering`.
470
+ * Returns a copy of `self` with `scientificNotation` set to `Engineering`
471
471
  *
472
472
  * @category Modifiers
473
473
  */
@@ -475,7 +475,7 @@ export const withEngineeringScientificNotation = /*#__PURE__*/flow(/*#__PURE__*/
475
475
  scientificNotation: ScientificNotation.Engineering
476
476
  }), make);
477
477
  /**
478
- * Combinator that returns a copy of self with `thousandSeparator` set to `thousandSeparator`.
478
+ * Returns a copy of `self` with `thousandSeparator` set to `thousandSeparator`
479
479
  *
480
480
  * @category Modifiers
481
481
  */
@@ -483,13 +483,13 @@ export const withThousandSeparator = thousandSeparator => flow(MStruct.append({
483
483
  thousandSeparator
484
484
  }), make);
485
485
  /**
486
- * Combinator that returns a copy of self with `thousandSeparator` set to ''.
486
+ * Returns a copy of `self` with `thousandSeparator` set to ''
487
487
  *
488
488
  * @category Modifiers
489
489
  */
490
490
  export const withoutThousandSeparator = /*#__PURE__*/withThousandSeparator('');
491
491
  /**
492
- * Combinator that returns a copy of self with `fractionalSeparator` set to `fractionalSeparator`.
492
+ * Returns a copy of `self` with `fractionalSeparator` set to `fractionalSeparator`
493
493
  *
494
494
  * @category Modifiers
495
495
  */
@@ -497,7 +497,7 @@ export const withFractionalSeparator = fractionalSeparator => flow(MStruct.appen
497
497
  fractionalSeparator: fractionalSeparator
498
498
  }), make);
499
499
  /**
500
- * Combinator that returns a copy of self with `signDisplay` set to `Auto`.
500
+ * Returns a copy of `self` with `signDisplay` set to `Auto`
501
501
  *
502
502
  * @category Modifiers
503
503
  */
@@ -505,7 +505,7 @@ export const withSignDisplayForNegative = /*#__PURE__*/flow(/*#__PURE__*/MStruct
505
505
  signDisplay: SignDisplay.Auto
506
506
  }), make);
507
507
  /**
508
- * Combinator that returns a copy of self with `signDisplay` set to `Always`.
508
+ * Returns a copy of `self` with `signDisplay` set to `Always`
509
509
  *
510
510
  * @category Modifiers
511
511
  */
@@ -513,7 +513,7 @@ export const withSignDisplay = /*#__PURE__*/flow(/*#__PURE__*/MStruct.append({
513
513
  signDisplay: SignDisplay.Always
514
514
  }), make);
515
515
  /**
516
- * Combinator that returns a copy of self with `signDisplay` set to `ExceptZero`.
516
+ * Returns a copy of `self` with `signDisplay` set to `ExceptZero`
517
517
  *
518
518
  * @category Modifiers
519
519
  */
@@ -521,7 +521,7 @@ export const withSignDisplayExceptZero = /*#__PURE__*/flow(/*#__PURE__*/MStruct.
521
521
  signDisplay: SignDisplay.ExceptZero
522
522
  }), make);
523
523
  /**
524
- * Combinator that returns a copy of self with `signDisplay` set to `Negative`.
524
+ * Returns a copy of `self` with `signDisplay` set to `Negative`
525
525
  *
526
526
  * @category Modifiers
527
527
  */
@@ -529,7 +529,7 @@ export const withSignDisplayForNegativeExceptZero = /*#__PURE__*/flow(/*#__PURE_
529
529
  signDisplay: SignDisplay.Negative
530
530
  }), make);
531
531
  /**
532
- * Combinator that returns a copy of self with `signDisplay` set to `Never`.
532
+ * Returns a copy of `self` with `signDisplay` set to `Never`
533
533
  *
534
534
  * @category Modifiers
535
535
  */
@@ -537,7 +537,7 @@ export const withoutSignDisplay = /*#__PURE__*/flow(/*#__PURE__*/MStruct.append(
537
537
  signDisplay: SignDisplay.Never
538
538
  }), make);
539
539
  /**
540
- * Combinator that returns a copy of self with `roundingMode` set to `Ceil`.
540
+ * Returns a copy of `self` with `roundingMode` set to `Ceil`
541
541
  *
542
542
  * @category Modifiers
543
543
  */
@@ -545,7 +545,7 @@ export const withCeilRoundingMode = /*#__PURE__*/flow(/*#__PURE__*/MStruct.appen
545
545
  roundingMode: CVRoundingMode.Type.Ceil
546
546
  }), make);
547
547
  /**
548
- * Combinator that returns a copy of self with `roundingMode` set to `Floor`.
548
+ * Returns a copy of `self` with `roundingMode` set to `Floor`
549
549
  *
550
550
  * @category Modifiers
551
551
  */
@@ -553,7 +553,7 @@ export const withFloorRoundingMode = /*#__PURE__*/flow(/*#__PURE__*/MStruct.appe
553
553
  roundingMode: CVRoundingMode.Type.Floor
554
554
  }), make);
555
555
  /**
556
- * Combinator that returns a copy of self with `roundingMode` set to `Expand`.
556
+ * Returns a copy of `self` with `roundingMode` set to `Expand`
557
557
  *
558
558
  * @category Modifiers
559
559
  */
@@ -561,7 +561,7 @@ export const withExpandRoundingMode = /*#__PURE__*/flow(/*#__PURE__*/MStruct.app
561
561
  roundingMode: CVRoundingMode.Type.Expand
562
562
  }), make);
563
563
  /**
564
- * Combinator that returns a copy of self with `roundingMode` set to `Trunc`.
564
+ * Returns a copy of `self` with `roundingMode` set to `Trunc`
565
565
  *
566
566
  * @category Modifiers
567
567
  */
@@ -569,7 +569,7 @@ export const withTruncRoundingMode = /*#__PURE__*/flow(/*#__PURE__*/MStruct.appe
569
569
  roundingMode: CVRoundingMode.Type.Trunc
570
570
  }), make);
571
571
  /**
572
- * Combinator that returns a copy of self with `roundingMode` set to `HalfCeil`.
572
+ * Returns a copy of `self` with `roundingMode` set to `HalfCeil`
573
573
  *
574
574
  * @category Modifiers
575
575
  */
@@ -577,7 +577,7 @@ export const withHalfCeilRoundingMode = /*#__PURE__*/flow(/*#__PURE__*/MStruct.a
577
577
  roundingMode: CVRoundingMode.Type.HalfCeil
578
578
  }), make);
579
579
  /**
580
- * Combinator that returns a copy of self with `roundingMode` set to `HalfFloor`.
580
+ * Returns a copy of `self` with `roundingMode` set to `HalfFloor`
581
581
  *
582
582
  * @category Modifiers
583
583
  */
@@ -585,7 +585,7 @@ export const withHalfFloorRoundingMode = /*#__PURE__*/flow(/*#__PURE__*/MStruct.
585
585
  roundingMode: CVRoundingMode.Type.HalfFloor
586
586
  }), make);
587
587
  /**
588
- * Combinator that returns a copy of self with `roundingMode` set to `HalfExpand`.
588
+ * Returns a copy of `self` with `roundingMode` set to `HalfExpand`
589
589
  *
590
590
  * @category Modifiers
591
591
  */
@@ -593,7 +593,7 @@ export const withHalfExpandRoundingMode = /*#__PURE__*/flow(/*#__PURE__*/MStruct
593
593
  roundingMode: CVRoundingMode.Type.HalfExpand
594
594
  }), make);
595
595
  /**
596
- * Combinator that returns a copy of self with `roundingMode` set to `HalfTrunc`.
596
+ * Returns a copy of `self` with `roundingMode` set to `HalfTrunc`
597
597
  *
598
598
  * @category Modifiers
599
599
  */
@@ -601,7 +601,7 @@ export const withHalfTruncRoundingMode = /*#__PURE__*/flow(/*#__PURE__*/MStruct.
601
601
  roundingMode: CVRoundingMode.Type.HalfTrunc
602
602
  }), make);
603
603
  /**
604
- * Combinator that returns a copy of self with `roundingMode` set to `HalfEven`.
604
+ * Returns a copy of `self` with `roundingMode` set to `HalfEven`
605
605
  *
606
606
  * @category Modifiers
607
607
  */
@@ -609,7 +609,7 @@ export const withHalfEvenRoundingMode = /*#__PURE__*/flow(/*#__PURE__*/MStruct.a
609
609
  roundingMode: CVRoundingMode.Type.HalfEven
610
610
  }), make);
611
611
  /**
612
- * Combinator that returns a copy of self with `showNullIntegerPart` set to `false`.
612
+ * Returns a copy of `self` with `showNullIntegerPart` set to `false`
613
613
  *
614
614
  * @category Modifiers
615
615
  */
@@ -617,7 +617,7 @@ export const withNullIntegerPartNotShowing = /*#__PURE__*/flow(/*#__PURE__*/MStr
617
617
  showNullIntegerPart: false
618
618
  }), make);
619
619
  /**
620
- * Combinator that returns a copy of self with `showNullIntegerPart` set to `true`.
620
+ * Returns a copy of `self` with `showNullIntegerPart` set to `true`
621
621
  *
622
622
  * @category Modifiers
623
623
  */
@@ -625,7 +625,7 @@ export const withNullIntegerPartShowing = /*#__PURE__*/flow(/*#__PURE__*/MStruct
625
625
  showNullIntegerPart: true
626
626
  }), make);
627
627
  /**
628
- * NumberBase10Format instance that uses a comma as fractional separator, a space as thousand
628
+ * `CVNumberBase10Format` instance that uses a comma as fractional separator, a space as thousand
629
629
  * separator and shows at most three fractional digits. Used in countries like France,
630
630
  * French-speaking Canada, French-speaking Belgium, Denmark, Finland, Sweden...
631
631
  *
@@ -643,22 +643,22 @@ export const frenchStyleNumber = /*#__PURE__*/make({
643
643
  signDisplay: SignDisplay.Negative
644
644
  });
645
645
  /**
646
- * NumberBase10Format instance that uses a comma as fractional separator, no thousand separator and
647
- * shows at most three fractional digits. Used in countries like France, French-speaking Canada,
646
+ * `CVNumberBase10Format` instance that uses a comma as fractional separator, no thousand separator
647
+ * and shows at most three fractional digits. Used in countries like France, French-speaking Canada,
648
648
  * French-speaking Belgium, Denmark, Finland, Sweden...
649
649
  *
650
650
  * @category Instances
651
651
  */
652
652
  export const frenchStyleUngroupedNumber = /*#__PURE__*/pipe(frenchStyleNumber, withoutThousandSeparator);
653
653
  /**
654
- * French-style integer NumberBase10Format instance. Used in countries like France, French-speaking
655
- * Canada, French-speaking Belgium, Denmark, Finland, Sweden...
654
+ * French-style integer `CVNumberBase10Format` instance. Used in countries like France,
655
+ * French-speaking Canada, French-speaking Belgium, Denmark, Finland, Sweden...
656
656
  *
657
657
  * @category Instances
658
658
  */
659
659
  export const frenchStyleInteger = /*#__PURE__*/pipe(frenchStyleNumber, /*#__PURE__*/withMaxNDecimals(0));
660
660
  /**
661
- * NumberBase10Format instance that uses a comma as fractional separator, a dot as thousand
661
+ * `CVNumberBase10Format` instance that uses a comma as fractional separator, a dot as thousand
662
662
  * separator and shows at most three fractional digits. Used in countries like Dutch-speaking
663
663
  * Belgium, the Netherlands, Germany, Italy, Norway, Croatia, Spain...
664
664
  *
@@ -668,22 +668,22 @@ export const dutchStyleNumber = /*#__PURE__*/pipe(frenchStyleNumber, /*#__PURE__
668
668
  thousandSeparator: '.'
669
669
  }), make);
670
670
  /**
671
- * NumberBase10Format instance that uses a comma as fractional separator, no thousand separator and
672
- * shows at most three fractional digits. Used in countries like Dutch-speaking Belgium, the
671
+ * `CVNumberBase10Format` instance that uses a comma as fractional separator, no thousand separator
672
+ * and shows at most three fractional digits. Used in countries like Dutch-speaking Belgium, the
673
673
  * Netherlands, Germany, Italy, Norway, Croatia, Spain...
674
674
  *
675
675
  * @category Instances
676
676
  */
677
677
  export const dutchStyleUngroupedNumber = /*#__PURE__*/pipe(dutchStyleNumber, withoutThousandSeparator);
678
678
  /**
679
- * Dutch-style integer NumberBase10Format instance. Used in countries like Dutch-speaking Belgium,
680
- * the Netherlands, Germany, Italy, Norway, Croatia, Spain...
679
+ * Dutch-style integer `CVNumberBase10Format` instance. Used in countries like Dutch-speaking
680
+ * Belgium, the Netherlands, Germany, Italy, Norway, Croatia, Spain...
681
681
  *
682
682
  * @category Instances
683
683
  */
684
684
  export const dutchStyleInteger = /*#__PURE__*/pipe(dutchStyleNumber, /*#__PURE__*/withMaxNDecimals(0));
685
685
  /**
686
- * NumberBase10Format instance that uses a dot as fractional separator, a comma as thousand
686
+ * `CVNumberBase10Format` instance that uses a dot as fractional separator, a comma as thousand
687
687
  * separator and shows at most three fractional digits. Used in countries like the UK, the US,
688
688
  * English-speaking Canada, Australia, Thaïland, Bosnia...
689
689
  *
@@ -694,22 +694,22 @@ export const ukStyleNumber = /*#__PURE__*/pipe(frenchStyleNumber, /*#__PURE__*/M
694
694
  thousandSeparator: ','
695
695
  }), make);
696
696
  /**
697
- * NumberBase10Format instance that uses a dot as fractional separator, no thousand separator and
698
- * shows at most three fractional digits. Used in countries like the UK, the US, English-speaking
699
- * Canada, Australia, Thaïland, Bosnia...
697
+ * `CVNumberBase10Format` instance that uses a dot as fractional separator, no thousand separator
698
+ * and shows at most three fractional digits. Used in countries like the UK, the US,
699
+ * English-speaking Canada, Australia, Thaïland, Bosnia...
700
700
  *
701
701
  * @category Instances
702
702
  */
703
703
  export const ukStyleUngroupedNumber = /*#__PURE__*/pipe(ukStyleNumber, withoutThousandSeparator);
704
704
  /**
705
- * Uk-style integer NumberBase10Format instance. Used in countries like the UK, the US,
705
+ * Uk-style integer `CVNumberBase10Format` instance. Used in countries like the UK, the US,
706
706
  * English-speaking Canada, Australia, Thaïland, Bosnia...
707
707
  *
708
708
  * @category Instances
709
709
  */
710
710
  export const ukStyleInteger = /*#__PURE__*/pipe(ukStyleNumber, /*#__PURE__*/withMaxNDecimals(0));
711
711
  /**
712
- * Integer NumberBase10Format instance with no thousand separator
712
+ * Integer `CVNumberBase10Format` instance with no thousand separator
713
713
  *
714
714
  * @category Instances
715
715
  */