@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
@@ -1,9 +1,11 @@
1
1
  /**
2
- * This module implements a positive finite number brand (NaN, Infinity and negative numbers
3
- * disallowed). Useful for a price, a physical quantity...
2
+ * This module implements a CVPositiveReal brand, i.e. a number greater than or equal to 0
3
+ * (Infinity, NaN disallowed). Can be used to represent a price, a speed,... 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 { MTypes } from '@parischap/effect-lib';
6
- import { BigDecimal, Brand, Either, Option } from 'effect';
8
+ import { BigDecimal, Brand, Either, Option, Schema } from 'effect';
7
9
  import * as CVPositive from './internal/Positive.js';
8
10
  import type * as CVPositiveInteger from './PositiveInteger.js';
9
11
  import * as CVReal from './Real.js';
@@ -16,115 +18,135 @@ export declare const moduleTag = "@parischap/conversions/PositiveReal/";
16
18
  /**
17
19
  * Brand constructor. Should not be used directly
18
20
  *
19
- * @category Constructors
21
+ * @ignore
20
22
  */
21
23
  export declare const constructor: Brand.Brand.Constructor<number & Brand.Brand<typeof CVReal.TypeId> & Brand.Brand<typeof CVPositive._TypeId>>;
22
24
  /**
23
- * PositiveReal type
25
+ * `CVPositiveReal` Type
24
26
  *
25
27
  * @category Models
26
28
  */
27
29
  export type Type = Brand.Brand.FromConstructor<typeof constructor>;
28
30
  /**
29
- * Constructs a PositiveReal from a number without any verifications
31
+ * Constructs a `CVPositiveReal` from a number without any verifications
30
32
  *
31
33
  * @category Constructors
32
34
  */
33
35
  export declare const unsafeFromNumber: Brand.Brand.Constructor<number & Brand.Brand<typeof CVReal.TypeId> & Brand.Brand<typeof CVPositive._TypeId>>;
34
36
  /**
35
- * Constructs an Option of a PositiveReal from a number
37
+ * Tries to construct a `CVPositiveReal` from a number. Returns a `Some` if the conversion can be
38
+ * performed, a `None` otherwise
36
39
  *
37
40
  * @category Constructors
38
41
  */
39
42
  export declare const fromNumberOption: MTypes.OneArgFunction<number, Option.Option<Type>>;
40
43
  /**
41
- * Constructs an Either of a PositiveReal from a number
44
+ * Tries to construct a `CVPositiveReal` from a number. Returns a `Right` if the conversion can be
45
+ * performed, a `Left` otherwise
42
46
  *
43
47
  * @category Constructors
44
48
  */
45
49
  export declare const fromNumber: MTypes.OneArgFunction<number, Either.Either<Type, Brand.Brand.BrandErrors>>;
46
50
  /**
47
- * Constructs a PositiveReal from a number or throws
51
+ * Constructs a `CVPositiveReal` from a number if possible. Throws otherwise
48
52
  *
49
53
  * @category Constructors
50
54
  */
51
55
  export declare const fromNumberOrThrow: MTypes.OneArgFunction<number, Type>;
52
56
  /**
53
- * Constructs a PositiveReal from a BigDecimal without any checks
57
+ * Constructs a `CVPositiveReal` from a `BigDecimal` without any checks
54
58
  *
55
59
  * @category Constructors
56
60
  */
57
61
  export declare const unsafeFromBigDecimal: MTypes.OneArgFunction<BigDecimal.BigDecimal, Type>;
58
62
  /**
59
- * Constructs an Option of a PositiveReal from a BigDecimal
63
+ * Tries to construct a `CVPositiveReal` from a `BigDecimal`. Returns a `Some` if the conversion can
64
+ * be performed, a `None` otherwise
60
65
  *
61
66
  * @category Constructors
62
67
  */
63
68
  export declare const fromBigDecimalOption: MTypes.OneArgFunction<BigDecimal.BigDecimal, Option.Option<Type>>;
64
69
  /**
65
- * Constructs an Either of a PositiveReal from a BigDecimal
70
+ * Tries to construct a `CVPositiveReal` from a `BigDecimal`. Returns a `Right` if the conversion
71
+ * can be performed, a `Left` otherwise
66
72
  *
67
73
  * @category Constructors
68
74
  */
69
75
  export declare const fromBigDecimal: MTypes.OneArgFunction<BigDecimal.BigDecimal, Either.Either<Type, Brand.Brand.BrandErrors>>;
70
76
  /**
71
- * Constructs a PositiveReal from a BigDecimal or throws
77
+ * Constructs a `CVPositiveReal` from a `BigDecimal` if possible. Throws otherwise
72
78
  *
73
79
  * @category Constructors
74
80
  */
75
81
  export declare const fromBigDecimalOrThrow: MTypes.OneArgFunction<BigDecimal.BigDecimal, Type>;
76
82
  /**
77
- * Constructs a PositiveReal from a BigInt without any checks
83
+ * Constructs a `CVPositiveReal` from a `BigInt` without any checks
78
84
  *
79
85
  * @category Constructors
80
86
  */
81
87
  export declare const unsafeFromBigInt: MTypes.OneArgFunction<bigint, Type>;
82
88
  /**
83
- * Constructs an Option of a PositiveReal from a BigInt
89
+ * Tries to construct a `CVPositiveReal` from a `BigInt`. Returns a `Some` if the conversion can be
90
+ * performed, a `None` otherwise
84
91
  *
85
92
  * @category Constructors
86
93
  */
87
94
  export declare const fromBigIntOption: MTypes.OneArgFunction<bigint, Option.Option<Type>>;
88
95
  /**
89
- * Constructs an Either of a PositiveReal from a BigInt
96
+ * Tries to construct a `CVPositiveReal` from a `BigInt`. Returns a `Right` if the conversion can be
97
+ * performed, a `Left` otherwise
90
98
  *
91
99
  * @category Constructors
92
100
  */
93
101
  export declare const fromBigInt: MTypes.OneArgFunction<bigint, Either.Either<Type, Brand.Brand.BrandErrors>>;
94
102
  /**
95
- * Constructs a PositiveReal from a BigInt or throws
103
+ * Constructs a `CVPositiveReal` from a `BigInt` if possible. Throws otherwise
96
104
  *
97
105
  * @category Constructors
98
106
  */
99
107
  export declare const fromBigIntOrThrow: MTypes.OneArgFunction<bigint, Type>;
100
108
  /**
101
- * Constructs a PositiveReal from a Real without any checks
109
+ * Constructs a `CVPositiveReal` from a `CVReal` without any checks
102
110
  *
103
111
  * @category Constructors
104
112
  */
105
113
  export declare const unsafeFromReal: MTypes.OneArgFunction<CVReal.Type, Type>;
106
114
  /**
107
- * Constructs an Option of a PositiveReal from a Real
115
+ * Tries to construct a `CVPositiveReal` from a `CVReal`. Returns a `Some` if the conversion can be
116
+ * performed, a `None` otherwise
108
117
  *
109
118
  * @category Constructors
110
119
  */
111
120
  export declare const fromRealOption: MTypes.OneArgFunction<CVReal.Type, Option.Option<Type>>;
112
121
  /**
113
- * Constructs an Either of a PositiveReal from a Real
122
+ * Tries to construct a `CVPositiveReal` from a `CVReal`. Returns a `Right` if the conversion can be
123
+ * performed, a `Left` otherwise
114
124
  *
115
125
  * @category Constructors
116
126
  */
117
127
  export declare const fromReal: MTypes.OneArgFunction<CVReal.Type, Either.Either<Type, Brand.Brand.BrandErrors>>;
118
128
  /**
119
- * Constructs a PositiveReal from a Real or throws
129
+ * Constructs a `CVPositiveReal` from a `CVReal` if possible. Throws otherwise
120
130
  *
121
131
  * @category Constructors
122
132
  */
123
133
  export declare const fromRealOrThrow: MTypes.OneArgFunction<CVReal.Type, Type>;
124
134
  /**
125
- * Constructs a PositiveReal from a PositiveInteger
135
+ * Constructs a `CVPositiveReal` from a `CVPositiveInteger`
126
136
  *
127
137
  * @category Constructors
128
138
  */
129
139
  export declare const fromPositiveInteger: MTypes.OneArgFunction<CVPositiveInteger.Type, Type>;
140
+ /**
141
+ * A `Schema` that transforms a number into a `CVPositiveReal`
142
+ *
143
+ * @ignore
144
+ */
145
+ export declare const SchemaFromNumber: Schema.Schema<Type, number>;
146
+ /**
147
+ * A `Schema` that represents a `CVPositiveReal`
148
+ *
149
+ * @ignore
150
+ */
151
+ export declare const SchemaFromSelf: Schema.Schema<Type>;
130
152
  //# sourceMappingURL=PositiveReal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PositiveReal.d.ts","sourceRoot":"","sources":["../../esm/PositiveReal.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAW,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAkB,MAAM,EAAU,MAAM,QAAQ,CAAC;AACnF,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,KAAK,iBAAiB,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AAEpC;;;;GAIG;AACH,eAAO,MAAM,SAAS,yCAAyC,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,WAAW,8GAAwD,CAAC;AAEjF;;;;GAIG;AACH,MAAM,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,WAAW,CAA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B,CAAC,IAAI,EAAE,IAAI,CACzD,CAAC;AAE5B;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAExD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAuC,CAAC"}
package/dts/Real.d.ts CHANGED
@@ -1,6 +1,11 @@
1
- /** This module implements a finite number brand (Infinity or Nan disallowed) */
1
+ /**
2
+ * This module implements a CVReal brand, i.e. a number that disallows Infinity and NaN. Can be used
3
+ * to represent a temperature, a height from sea-level,... See the `Effect` documentation about
4
+ * Branding (https://effect.website/docs/code-style/branded-types/) if you are not familiar with
5
+ * this concept.
6
+ */
2
7
  import { MTypes } from '@parischap/effect-lib';
3
- import { BigDecimal, Brand, Either, Option } from 'effect';
8
+ import { BigDecimal, Brand, Either, Option, Schema } from 'effect';
4
9
  /**
5
10
  * Module tag
6
11
  *
@@ -15,7 +20,7 @@ export declare const moduleTag = "@parischap/conversions/Real/";
15
20
  export declare const TypeId: unique symbol;
16
21
  type _TypeId = typeof TypeId;
17
22
  /**
18
- * Real type
23
+ * `CVReal` type
19
24
  *
20
25
  * @category Models
21
26
  */
@@ -23,80 +28,98 @@ export type Type = Brand.Branded<number, _TypeId>;
23
28
  /**
24
29
  * Brand constructor. Should not be used directly
25
30
  *
26
- * @category Constructors
31
+ * @ignore
27
32
  */
28
33
  export declare const constructor: Brand.Brand.Constructor<Type>;
29
34
  /**
30
- * Constructs a Real from a number without any verifications
35
+ * Constructs a `CVReal` from a number without any verifications
31
36
  *
32
37
  * @category Constructors
33
38
  */
34
39
  export declare const unsafeFromNumber: Brand.Brand.Constructor<Type>;
35
40
  /**
36
- * Constructs an Option of a Real from a number
41
+ * Tries to construct a `CVReal` from a number. Returns a `Some` if the conversion can be performed,
42
+ * a `None` otherwise
37
43
  *
38
44
  * @category Constructors
39
45
  */
40
46
  export declare const fromNumberOption: MTypes.OneArgFunction<number, Option.Option<Type>>;
41
47
  /**
42
- * Constructs an Either of a Real from a number
48
+ * Tries to construct a `CVReal` from a number. Returns a `Right` if the conversion can be
49
+ * performed, a `Left` otherwise
43
50
  *
44
51
  * @category Constructors
45
52
  */
46
53
  export declare const fromNumber: MTypes.OneArgFunction<number, Either.Either<Type, Brand.Brand.BrandErrors>>;
47
54
  /**
48
- * Constructs a Real from a number or throws
55
+ * Constructs a `CVReal` from a number if possible. Throws otherwise
49
56
  *
50
57
  * @category Constructors
51
58
  */
52
59
  export declare const fromNumberOrThrow: MTypes.OneArgFunction<number, Type>;
53
60
  /**
54
- * Constructs a Real from a BigDecimal without any checks
61
+ * Constructs a `CVReal` from a `BigDecimal` without any checks
55
62
  *
56
63
  * @category Constructors
57
64
  */
58
65
  export declare const unsafeFromBigDecimal: MTypes.OneArgFunction<BigDecimal.BigDecimal, Type>;
59
66
  /**
60
- * Constructs an Option of a Real from a BigDecimal.
67
+ * Tries to construct a `CVReal` from a `BigDecimal`. Returns a `Some` if the conversion can be
68
+ * performed, a `None` otherwise
61
69
  *
62
70
  * @category Constructors
63
71
  */
64
72
  export declare const fromBigDecimalOption: MTypes.OneArgFunction<BigDecimal.BigDecimal, Option.Option<Type>>;
65
73
  /**
66
- * Constructs an Either of a Real from a BigDecimal.
74
+ * Tries to construct a `CVReal` from a `BigDecimal`. Returns a `Right` if the conversion can be
75
+ * performed, a `Left` otherwise
67
76
  *
68
77
  * @category Constructors
69
78
  */
70
79
  export declare const fromBigDecimal: MTypes.OneArgFunction<BigDecimal.BigDecimal, Either.Either<Type, Brand.Brand.BrandErrors>>;
71
80
  /**
72
- * Constructs a Real from a BigDecimal or throws
81
+ * Constructs a `CVReal` from a `BigDecimal` if possible. Throws otherwise
73
82
  *
74
83
  * @category Constructors
75
84
  */
76
85
  export declare const fromBigDecimalOrThrow: MTypes.OneArgFunction<BigDecimal.BigDecimal, Type>;
77
86
  /**
78
- * Constructs a Real from a BigInt without any checks
87
+ * Constructs a `CVReal` from a `BigInt` without any checks
79
88
  *
80
89
  * @category Constructors
81
90
  */
82
91
  export declare const unsafeFromBigInt: MTypes.OneArgFunction<bigint, Type>;
83
92
  /**
84
- * Constructs an Option of a Real from a BigInt.
93
+ * Tries to construct a `CVReal` from a `BigInt`. Returns a `Some` if the conversion can be
94
+ * performed, a `None` otherwise
85
95
  *
86
96
  * @category Constructors
87
97
  */
88
98
  export declare const fromBigIntOption: MTypes.OneArgFunction<bigint, Option.Option<Type>>;
89
99
  /**
90
- * Constructs an Either of a Real from a BigInt.
100
+ * Tries to construct a `CVReal` from a `BigInt`. Returns a `Right` if the conversion can be
101
+ * performed, a `Left` otherwise
91
102
  *
92
103
  * @category Constructors
93
104
  */
94
105
  export declare const fromBigInt: MTypes.OneArgFunction<bigint, Either.Either<Type, Brand.Brand.BrandErrors>>;
95
106
  /**
96
- * Constructs a Real from a BigInt or throws
107
+ * Constructs a `CVReal` from a `BigInt` if possible. Throws otherwise
97
108
  *
98
109
  * @category Constructors
99
110
  */
100
111
  export declare const fromBigIntOrThrow: MTypes.OneArgFunction<bigint, Type>;
112
+ /**
113
+ * A `Schema` that transforms a number into a `CVReal`
114
+ *
115
+ * @ignore
116
+ */
117
+ export declare const SchemaFromNumber: Schema.Schema<Type, number>;
118
+ /**
119
+ * A `Schema` that represents a `CVReal`
120
+ *
121
+ * @ignore
122
+ */
123
+ export declare const SchemaFromSelf: Schema.Schema<Type>;
101
124
  export {};
102
125
  //# sourceMappingURL=Real.d.ts.map
package/dts/Real.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Real.d.ts","sourceRoot":"","sources":["../../esm/Real.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAEhF,OAAO,EAAoB,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAQ,MAAM,EAAU,MAAM,QAAQ,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,SAAS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KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CACd,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAC/B,CAAC;AAEpC;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAExD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAuC,CAAC"}
@@ -1,7 +1,10 @@
1
- /** This module defines possible rounding modes (see Intl.NumberFormat) */
1
+ /**
2
+ * This module defines the list of available rounding modes (see Intl.NumberFormat) that can be used
3
+ * by a `CVRoundingOption` (see RoundingOption.ts)
4
+ */
2
5
  import { MTypes } from '@parischap/effect-lib';
3
6
  /**
4
- * Possible rounding modes
7
+ * Type that represents the possible rounding modes
5
8
  *
6
9
  * @category Models
7
10
  */
@@ -52,7 +55,7 @@ export declare enum Type {
52
55
  *
53
56
  * @category Destructors
54
57
  */
55
- export declare const toName: MTypes.OneArgFunction<Type, string>;
58
+ export declare const getName: MTypes.OneArgFunction<Type, string>;
56
59
  /**
57
60
  * Type of a Correcter
58
61
  *
@@ -1 +1 @@
1
- {"version":3,"file":"RoundingMode.d.ts","sourceRoot":"","sources":["../../esm/RoundingMode.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAE1E,OAAO,EAAU,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGvD;;;;GAIG;AACH,oBAAY,IAAI;IACf,uFAAuF;IACvF,IAAI,IAAI;IACR,yFAAyF;IACzF,KAAK,IAAI;IACT;;;OAGG;IACH,MAAM,IAAI;IACV;;;OAGG;IACH,KAAK,IAAI;IACT;;;OAGG;IACH,QAAQ,IAAI;IACZ;;;OAGG;IACH,SAAS,IAAI;IACb;;;OAGG;IACH,UAAU,IAAI;IACd;;;OAGG;IACH,SAAS,IAAI;IACb;;;;OAIG;IAC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AAE,SAAS,CAiE9D,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /**
2
- * This module allows you to round numbers and BigDecimal's according to diverse RoundingMode's with
3
- * a given precision
2
+ * This module implements a `CVRoundingOption` which describes the possible options to round a
3
+ * number or `BigDecimal` and implements the rounding algortithm
4
4
  */
5
5
  import { MInspectable, MTypes } from '@parischap/effect-lib';
6
6
  import { BigDecimal, Equal, Equivalence, Pipeable } from 'effect';
@@ -12,7 +12,7 @@ import * as CVRoundingMode from './RoundingMode.js';
12
12
  */
13
13
  export declare const moduleTag = "@parischap/conversions/RoundingOption/";
14
14
  /**
15
- * Type that represents a Rounder.
15
+ * `CVRoundingOption` Type
16
16
  *
17
17
  * @category Models
18
18
  */
@@ -35,7 +35,7 @@ export declare const has: (u: unknown) => u is Type;
35
35
  */
36
36
  export declare const equivalence: Equivalence.Equivalence<Type>;
37
37
  /**
38
- * Constructor
38
+ * Constructs a `CVRoundingOption` with the specified `precision` and `roundingMode`
39
39
  *
40
40
  * @category Constructors
41
41
  */
@@ -44,8 +44,8 @@ export declare const make: ({ precision, roundingMode }?: {
44
44
  readonly roundingMode?: CVRoundingMode.Type;
45
45
  }) => Type;
46
46
  /**
47
- * RoundingOption instance that uses the HalfExpand Rounding mode and precision=2. Can be used in
48
- * accounting apps of most countries.
47
+ * `CVRoundingOption` instance that uses the `HalfExpand` `CVRoundingMode` and `precision=2`. Can be
48
+ * used in accounting apps of most countries througout the world
49
49
  *
50
50
  * @category Instances
51
51
  */
package/dts/Schema.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * An extension to the Effect Schema module that adds Schema instances for data conversion like
3
- * number and date formatting and parsing
2
+ * An extension to the `Effect.Schema` module that adds Schema instances for number and date
3
+ * formatting and parsing and implements new brands
4
4
  */
5
5
  import { MTypes } from '@parischap/effect-lib';
6
6
  import { BigDecimal, DateTime, Schema } from 'effect';
@@ -17,81 +17,80 @@ import * as CVTemplate from './Template.js';
17
17
  import * as CVTemplateParts from './TemplateParts.js';
18
18
  import * as CVTemplatePlaceholder from './TemplatePlaceholder.js';
19
19
  /**
20
- * A Schema that transforms a string into a CVBrand.Email.Type
20
+ * A `Schema` that transforms a string into a `CVEmail`
21
21
  *
22
22
  * @category Schema transformations
23
23
  */
24
24
  export declare const Email: Schema.Schema<CVEmail.Type, string>;
25
25
  /**
26
- * A Schema that represents a CVBrand.Email.Type
26
+ * A `Schema` that represents a `CVEmail`
27
27
  *
28
28
  * @category Schema instances
29
29
  */
30
30
  export declare const EmailFromSelf: Schema.Schema<CVEmail.Type>;
31
31
  /**
32
- * A Schema that transforms a string into an CVBrand.SemVer.Type
32
+ * A `Schema` that transforms a string into a `CVSemVer`
33
33
  *
34
34
  * @category Schema transformations
35
35
  */
36
36
  export declare const SemVer: Schema.Schema<CVSemVer.Type, string>;
37
37
  /**
38
- * A Schema that represents a CVBrand.SemVer.Type
38
+ * A `Schema` that represents a `CVSemVer`
39
39
  *
40
40
  * @category Schema instances
41
41
  */
42
42
  export declare const SemVerFromSelf: Schema.Schema<CVSemVer.Type>;
43
43
  /**
44
- * A Schema that transforms a number into an CVReal.Type
44
+ * A `Schema` that transforms a number into a `CVReal`
45
45
  *
46
46
  * @category Schema transformations
47
47
  */
48
48
  export declare const RealFromNumber: Schema.Schema<CVReal.Type, number>;
49
49
  /**
50
- * A Schema that represents a CVReal.Type
50
+ * A `Schema` that represents `CVReal`
51
51
  *
52
52
  * @category Schema instances
53
53
  */
54
54
  export declare const RealFromSelf: Schema.Schema<CVReal.Type>;
55
55
  /**
56
- * A Schema that transforms a string into a Real according to the CVNumberBase10Format `format`.
57
- * Read documentation of CVNumberBase10Format.toRealParser and
58
- * CVNumberBase10Format.toNumberFormatter for more details
56
+ * A `Schema` that transforms a string into a `CVReal` according to the `format`. Read documentation
57
+ * of module NumberBase10Format.ts for more details
59
58
  *
60
59
  * @category Schema transformations
61
60
  */
62
61
  export declare const Real: (format: CVNumberBase10Format.Type) => Schema.Schema<CVReal.Type, string>;
63
62
  /**
64
- * A Schema that transforms a number into a CVInteger.Type
63
+ * A `Schema` that transforms a number into a `CVInteger`
65
64
  *
66
65
  * @category Schema transformations
67
66
  */
68
67
  export declare const IntegerFromNumber: Schema.Schema<CVInteger.Type, number>;
69
68
  /**
70
- * A Schema that represents a CVInteger.Type
69
+ * A `Schema` that represents a `CVInteger`
71
70
  *
72
71
  * @category Schema instances
73
72
  */
74
73
  export declare const IntegerFromSelf: Schema.Schema<CVInteger.Type>;
75
74
  /**
76
- * A Schema that transforms a number into a CVPositiveInteger.Type
75
+ * A `Schema` that transforms a number into a `CVPositiveInteger`
77
76
  *
78
77
  * @category Schema transformations
79
78
  */
80
79
  export declare const PositiveIntegerFromNumber: Schema.Schema<CVPositiveInteger.Type, number>;
81
80
  /**
82
- * A Schema that represents a CVPositiveInteger.Type
81
+ * A `Schema` that represents a `CVPositiveInteger`
83
82
  *
84
83
  * @category Schema instances
85
84
  */
86
85
  export declare const PositiveIntegerFromSelf: Schema.Schema<CVPositiveInteger.Type>;
87
86
  /**
88
- * A Schema that transforms a number into a CVPositiveReal.Type
87
+ * A `Schema` that transforms a number into a `CVPositiveReal`
89
88
  *
90
89
  * @category Schema transformations
91
90
  */
92
91
  export declare const PositiveRealFromNumber: Schema.Schema<CVPositiveReal.Type, number>;
93
92
  /**
94
- * A Schema that represents a CVPositiveReal.Type
93
+ * A `Schema` that represents a `CVPositiveReal`
95
94
  *
96
95
  * @category Schema instances
97
96
  */
@@ -99,29 +98,29 @@ export declare const PositiveRealFromSelf: Schema.Schema<CVPositiveReal.Type>;
99
98
  declare const BigDecimalFromString: (format: CVNumberBase10Format.Type) => Schema.Schema<BigDecimal.BigDecimal, string>;
100
99
  export {
101
100
  /**
102
- * A Schema that transforms a string into a BigDecimal according to the CVNumberBase10Format
103
- * `format`. Read documentation of CVNumberBase10Format.toBigDecimalParser and
104
- * CVNumberBase10Format.toNumberFormatter for more details
101
+ * A `Schema` that transforms a string into a `BigDecimal` according to `format`. Read
102
+ * documentation of module NumberBase10Format.ts for more details
105
103
  *
106
104
  * @category Schema transformations
107
105
  */
108
106
  BigDecimalFromString as BigDecimal };
109
107
  /**
110
- * A Schema that represents a CVDateTime
108
+ * A `Schema` that represents a `CVDateTime`
111
109
  *
112
110
  * @category Schema instances
113
111
  */
114
112
  export declare const DateTimeFromSelf: Schema.declare<CVDateTime.Type, CVDateTime.Type, readonly [], never>;
115
113
  /**
116
- * A Schema that transforms a CVDateTime into a Date. The CVDateTime object is created with the
117
- * default timeZoneOffset of the machine this code is running on
114
+ * A `Schema` that transforms a `CVDateTime` into a Javascript `Date`. Upon encoding, the
115
+ * `CVDateTime` object is created with the default timeZoneOffset of the machine this code is
116
+ * running on
118
117
  *
119
118
  * @category Schema instances
120
119
  */
121
120
  export declare const DateFromDateTime: Schema.Schema<Date, CVDateTime.Type>;
122
121
  /**
123
- * A Schema that transforms a CVDateTime into an Effect DateTime.Zoned. Both objects share the same
124
- * time zone offset.
122
+ * A `Schema` that transforms a `CVDateTime` into an `Effect.DateTime.Zoned`. Both objects share the
123
+ * same time zone offset
125
124
  *
126
125
  * @category Schema instances
127
126
  */
@@ -129,29 +128,29 @@ export declare const DateTimeZonedFromDateTime: Schema.Schema<DateTime.Zoned, CV
129
128
  declare const DateTimeFromString: (format: CVDateTimeFormat.Type) => Schema.Schema<CVDateTime.Type, string>;
130
129
  export {
131
130
  /**
132
- * A Schema that transforms a string into a CVDateTime according to the CVDateTimeFormat `format`.
133
- * Read documentation of CVDateTimeFormat.toParser and CVDateTimeFormat.toFormatter for more
134
- * details
131
+ * A `Schema` that transforms a string into a `CVDateTime` according to `format`. Read
132
+ * documentation of module DateTimeFormat.ts for more details
135
133
  *
136
134
  * @category Schema transformations
137
135
  */
138
136
  DateTimeFromString as DateTime };
139
137
  /**
140
- * A Schema that transforms a string into a Date according to the CVDateTimeFormat `format`. Read
141
- * documentation of CVDateTimeFormat.toParser and CVDateTimeFormat.toFormatter for more details
138
+ * A `Schema` that transforms a string into a Javascript `Date` according to `format`. Read
139
+ * documentation of module DateTimeFormat.ts for more details
142
140
  *
143
141
  * @category Schema transformations
144
142
  */
145
143
  export declare const Date: (format: CVDateTimeFormat.Type) => Schema.Schema<Date, string>;
146
144
  /**
147
- * A Schema that transforms a string into a Date according to the CVDateTimeFormat `format`. Read
148
- * documentation of CVDateTimeFormat.toParser and CVDateTimeFormat.toFormatter for more details
145
+ * A `Schema` that transforms a string into an `Effect.DateTime.Zoned` according to `format`. Read
146
+ * documentation of module DateTimeFormat.ts for more details
149
147
  *
150
148
  * @category Schema transformations
151
149
  */
152
150
  export declare const DateTimeZoned: (format: CVDateTimeFormat.Type) => Schema.Schema<DateTime.Zoned, string>;
153
151
  /**
154
- * A Schema that transforms a string into an object according to a CVTemplate (see Template.ts)
152
+ * A `Schema` that transforms a string into an object according to template. Read documentation of
153
+ * module Template.ts for more details
155
154
  *
156
155
  * @category Schema transformations
157
156
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../esm/Schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAkB,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAEN,UAAU,EACV,QAAQ,EAOR,MAAM,EACN,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,gBAAgB,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,oBAAoB,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,iBAAiB,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AA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