@parischap/conversions 0.1.0 → 0.2.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 +51 -50
- package/cjs/BigDecimal.js +2 -2
- package/cjs/BigInt.js +7 -5
- package/cjs/BigInt.js.map +1 -1
- package/cjs/DateTime.js +144 -136
- package/cjs/DateTime.js.map +1 -1
- package/cjs/DateTimeFormat.js +7 -2
- package/cjs/DateTimeFormat.js.map +1 -1
- package/cjs/DateTimeFormatContext.js +11 -6
- package/cjs/DateTimeFormatContext.js.map +1 -1
- package/cjs/Email.js +11 -15
- package/cjs/Email.js.map +1 -1
- package/cjs/Integer.js +33 -23
- package/cjs/Integer.js.map +1 -1
- package/cjs/NumberBase10Format.js +65 -65
- package/cjs/PositiveInteger.js +44 -29
- package/cjs/PositiveInteger.js.map +1 -1
- package/cjs/PositiveReal.js +34 -24
- package/cjs/PositiveReal.js.map +1 -1
- package/cjs/Real.js +29 -18
- package/cjs/Real.js.map +1 -1
- package/cjs/RoundingMode.js +7 -4
- package/cjs/RoundingMode.js.map +1 -1
- package/cjs/RoundingOption.js +6 -6
- package/cjs/RoundingOption.js.map +1 -1
- package/cjs/Schema.js +29 -28
- package/cjs/Schema.js.map +1 -1
- package/cjs/SemVer.js +19 -20
- package/cjs/SemVer.js.map +1 -1
- package/cjs/Template.js +36 -31
- package/cjs/Template.js.map +1 -1
- package/cjs/TemplatePart.js +4 -4
- package/cjs/TemplateParts.js +3 -2
- package/cjs/TemplateParts.js.map +1 -1
- package/cjs/TemplatePlaceholder.js +56 -45
- package/cjs/TemplatePlaceholder.js.map +1 -1
- package/cjs/TemplateSeparator.js +17 -24
- package/cjs/TemplateSeparator.js.map +1 -1
- package/cjs/internal/Int.js +5 -8
- package/cjs/internal/Int.js.map +1 -1
- package/cjs/internal/Positive.js +5 -8
- package/cjs/internal/Positive.js.map +1 -1
- package/dts/BigDecimal.d.ts +2 -2
- package/dts/BigDecimal.d.ts.map +1 -1
- package/dts/BigInt.d.ts +7 -5
- package/dts/BigInt.d.ts.map +1 -1
- package/dts/DateTime.d.ts +145 -137
- package/dts/DateTime.d.ts.map +1 -1
- package/dts/DateTimeFormat.d.ts +7 -2
- package/dts/DateTimeFormat.d.ts.map +1 -1
- package/dts/DateTimeFormatContext.d.ts +17 -12
- package/dts/DateTimeFormatContext.d.ts.map +1 -1
- package/dts/Email.d.ts +16 -13
- package/dts/Email.d.ts.map +1 -1
- package/dts/Integer.d.ts +43 -21
- package/dts/Integer.d.ts.map +1 -1
- package/dts/NumberBase10Format.d.ts +68 -68
- package/dts/PositiveInteger.d.ts +54 -27
- package/dts/PositiveInteger.d.ts.map +1 -1
- package/dts/PositiveReal.d.ts +44 -22
- package/dts/PositiveReal.d.ts.map +1 -1
- package/dts/Real.d.ts +39 -16
- package/dts/Real.d.ts.map +1 -1
- package/dts/RoundingMode.d.ts +6 -3
- package/dts/RoundingMode.d.ts.map +1 -1
- package/dts/RoundingOption.d.ts +6 -6
- package/dts/Schema.d.ts +32 -33
- package/dts/Schema.d.ts.map +1 -1
- package/dts/SemVer.d.ts +25 -13
- package/dts/SemVer.d.ts.map +1 -1
- package/dts/Template.d.ts +30 -29
- package/dts/Template.d.ts.map +1 -1
- package/dts/TemplatePart.d.ts +4 -4
- package/dts/TemplateParts.d.ts +4 -3
- package/dts/TemplateParts.d.ts.map +1 -1
- package/dts/TemplatePlaceholder.d.ts +56 -44
- package/dts/TemplatePlaceholder.d.ts.map +1 -1
- package/dts/TemplateSeparator.d.ts +9 -51
- package/dts/TemplateSeparator.d.ts.map +1 -1
- package/dts/internal/Int.d.ts +0 -4
- package/dts/internal/Int.d.ts.map +1 -1
- package/dts/internal/Positive.d.ts +0 -4
- package/dts/internal/Positive.d.ts.map +1 -1
- package/esm/BigDecimal.js +2 -2
- package/esm/BigInt.js +7 -5
- package/esm/BigInt.js.map +1 -1
- package/esm/DateTime.js +144 -136
- package/esm/DateTime.js.map +1 -1
- package/esm/DateTimeFormat.js +7 -2
- package/esm/DateTimeFormat.js.map +1 -1
- package/esm/DateTimeFormatContext.js +11 -6
- package/esm/DateTimeFormatContext.js.map +1 -1
- package/esm/Email.js +10 -13
- package/esm/Email.js.map +1 -1
- package/esm/Integer.js +33 -23
- package/esm/Integer.js.map +1 -1
- package/esm/NumberBase10Format.js +65 -65
- package/esm/PositiveInteger.js +44 -29
- package/esm/PositiveInteger.js.map +1 -1
- package/esm/PositiveReal.js +34 -24
- package/esm/PositiveReal.js.map +1 -1
- package/esm/Real.js +29 -18
- package/esm/Real.js.map +1 -1
- package/esm/RoundingMode.js +6 -3
- package/esm/RoundingMode.js.map +1 -1
- package/esm/RoundingOption.js +6 -6
- package/esm/RoundingOption.js.map +1 -1
- package/esm/Schema.js +33 -34
- package/esm/Schema.js.map +1 -1
- package/esm/SemVer.js +18 -18
- package/esm/SemVer.js.map +1 -1
- package/esm/Template.js +36 -31
- package/esm/Template.js.map +1 -1
- package/esm/TemplatePart.js +4 -4
- package/esm/TemplateParts.js +3 -2
- package/esm/TemplateParts.js.map +1 -1
- package/esm/TemplatePlaceholder.js +55 -44
- package/esm/TemplatePlaceholder.js.map +1 -1
- package/esm/TemplateSeparator.js +16 -24
- package/esm/TemplateSeparator.js.map +1 -1
- package/esm/internal/Int.js +5 -7
- package/esm/internal/Int.js.map +1 -1
- package/esm/internal/Positive.js +5 -7
- package/esm/internal/Positive.js.map +1 -1
- package/package.json +2 -2
package/dts/internal/Int.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Int.d.ts","sourceRoot":"","sources":["../../../esm/internal/Int.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Int.d.ts","sourceRoot":"","sources":["../../../esm/internal/Int.ts"],"names":[],"mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Positive.d.ts","sourceRoot":"","sources":["../../../esm/internal/Positive.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Positive.d.ts","sourceRoot":"","sources":["../../../esm/internal/Positive.ts"],"names":[],"mappings":""}
|
package/esm/BigDecimal.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
/** A simple extension to the Effect
|
1
|
+
/** A simple extension to the `Effect.BigDecimal` module */
|
2
2
|
import { BigDecimal } from 'effect';
|
3
3
|
/**
|
4
|
-
* Constructs a BigDecimal from a
|
4
|
+
* Constructs a `BigDecimal` from a `CVReal`
|
5
5
|
*
|
6
6
|
* @category Constructors
|
7
7
|
*/
|
package/esm/BigInt.js
CHANGED
@@ -1,25 +1,27 @@
|
|
1
|
-
/** A simple extension to the Effect
|
1
|
+
/** A simple extension to the `Effect.BigInt` module */
|
2
2
|
import { MBigInt } from '@parischap/effect-lib';
|
3
3
|
/**
|
4
|
-
* Constructs a BigInt from a
|
4
|
+
* Constructs a `BigInt` from a `CVInteger`
|
5
5
|
*
|
6
6
|
* @category Constructors
|
7
7
|
*/
|
8
8
|
export const fromInteger = MBigInt.fromPrimitiveOrThrow;
|
9
9
|
/**
|
10
|
-
*
|
10
|
+
* Tries to construct a `BigInt` from a `CVReal`. Returns a `Some` if the conversion can be
|
11
|
+
* performed, a `None` otherwise
|
11
12
|
*
|
12
13
|
* @category Constructors
|
13
14
|
*/
|
14
15
|
export const fromRealOption = MBigInt.fromPrimitiveOption;
|
15
16
|
/**
|
16
|
-
*
|
17
|
+
* Tries to construct a `BigInt` from a `CVReal`. Returns a `Right` if the conversion can be
|
18
|
+
* performed, a `Left` otherwise
|
17
19
|
*
|
18
20
|
* @category Constructors
|
19
21
|
*/
|
20
22
|
export const fromReal = MBigInt.fromPrimitive;
|
21
23
|
/**
|
22
|
-
* Constructs a BigInt from a
|
24
|
+
* Constructs a `BigInt` from a `CVReal` if possible. Throws otherwise
|
23
25
|
*
|
24
26
|
* @category Constructors
|
25
27
|
*/
|
package/esm/BigInt.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BigInt.js","names":["MBigInt","fromInteger","fromPrimitiveOrThrow","fromRealOption","fromPrimitiveOption","fromReal","fromPrimitive","fromRealOrThrow"],"sources":["../../esm/BigInt.ts"],"sourcesContent":[null],"mappings":"AAAA;AAEA,SAASA,OAAO,QAAgB,uBAAuB;AAKvD;;;;;AAKA,OAAO,MAAMC,WAAW,GACvBD,OAAO,CAACE,oBAAoB;AAE7B
|
1
|
+
{"version":3,"file":"BigInt.js","names":["MBigInt","fromInteger","fromPrimitiveOrThrow","fromRealOption","fromPrimitiveOption","fromReal","fromPrimitive","fromRealOrThrow"],"sources":["../../esm/BigInt.ts"],"sourcesContent":[null],"mappings":"AAAA;AAEA,SAASA,OAAO,QAAgB,uBAAuB;AAKvD;;;;;AAKA,OAAO,MAAMC,WAAW,GACvBD,OAAO,CAACE,oBAAoB;AAE7B;;;;;;AAMA,OAAO,MAAMC,cAAc,GAGvBH,OAAO,CAACI,mBAA4B;AAExC;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAGjBL,OAAO,CAACM,aAAsB;AAElC;;;;;AAKA,OAAO,MAAMC,eAAe,GAC3BP,OAAO,CAACE,oBAA6B","ignoreList":[]}
|