@parischap/conversions 0.5.0 → 0.7.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 (41) hide show
  1. package/CVBigDecimal/package.json +5 -0
  2. package/CVBigInt/package.json +5 -0
  3. package/CVDateTime/package.json +5 -0
  4. package/CVDateTimeFormat/package.json +5 -0
  5. package/CVDateTimeFormatContext/package.json +5 -0
  6. package/CVEmail/package.json +5 -0
  7. package/CVInteger/package.json +5 -0
  8. package/CVNumberBase10Format/package.json +5 -0
  9. package/CVPositiveInteger/package.json +5 -0
  10. package/CVPositiveReal/package.json +5 -0
  11. package/CVReal/package.json +5 -0
  12. package/CVRoundingMode/package.json +5 -0
  13. package/CVRoundingOption/package.json +5 -0
  14. package/CVSchema/package.json +5 -0
  15. package/CVSemVer/package.json +5 -0
  16. package/CVTemplate/package.json +5 -0
  17. package/CVTemplatePart/package.json +5 -0
  18. package/CVTemplateParts/package.json +5 -0
  19. package/CVTemplatePlaceholder/package.json +5 -0
  20. package/CVTemplateSeparator/package.json +5 -0
  21. package/README.md +20 -4
  22. package/esm/BigDecimal.js +1 -1
  23. package/esm/BigInt.js +1 -1
  24. package/esm/DateTime.js +19 -2
  25. package/esm/DateTimeFormat.js +16 -2
  26. package/esm/DateTimeFormatContext.js +17 -2
  27. package/esm/Email.js +3 -2
  28. package/esm/Integer.js +6 -1
  29. package/esm/NumberBase10Format.js +25 -2
  30. package/esm/PositiveInteger.js +6 -1
  31. package/esm/PositiveReal.js +7 -2
  32. package/esm/Real.js +5 -2
  33. package/esm/RoundingMode.js +4 -2
  34. package/esm/RoundingOption.js +12 -2
  35. package/esm/Schema.js +10 -2
  36. package/esm/SemVer.js +3 -2
  37. package/esm/Template.js +16 -2
  38. package/esm/TemplateParts.js +5 -2
  39. package/esm/TemplatePlaceholder.js +20 -2
  40. package/esm/TemplateSeparator.js +9 -2
  41. package/package.json +102 -2
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/BigDecimal.js",
3
+ "module": "../esm/BigDecimal.js",
4
+ "types": "../dts/BigDecimal.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/BigInt.js",
3
+ "module": "../esm/BigInt.js",
4
+ "types": "../dts/BigInt.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/DateTime.js",
3
+ "module": "../esm/DateTime.js",
4
+ "types": "../dts/DateTime.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/DateTimeFormat.js",
3
+ "module": "../esm/DateTimeFormat.js",
4
+ "types": "../dts/DateTimeFormat.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/DateTimeFormatContext.js",
3
+ "module": "../esm/DateTimeFormatContext.js",
4
+ "types": "../dts/DateTimeFormatContext.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/Email.js",
3
+ "module": "../esm/Email.js",
4
+ "types": "../dts/Email.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/Integer.js",
3
+ "module": "../esm/Integer.js",
4
+ "types": "../dts/Integer.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/NumberBase10Format.js",
3
+ "module": "../esm/NumberBase10Format.js",
4
+ "types": "../dts/NumberBase10Format.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/PositiveInteger.js",
3
+ "module": "../esm/PositiveInteger.js",
4
+ "types": "../dts/PositiveInteger.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/PositiveReal.js",
3
+ "module": "../esm/PositiveReal.js",
4
+ "types": "../dts/PositiveReal.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/Real.js",
3
+ "module": "../esm/Real.js",
4
+ "types": "../dts/Real.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/RoundingMode.js",
3
+ "module": "../esm/RoundingMode.js",
4
+ "types": "../dts/RoundingMode.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/RoundingOption.js",
3
+ "module": "../esm/RoundingOption.js",
4
+ "types": "../dts/RoundingOption.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/Schema.js",
3
+ "module": "../esm/Schema.js",
4
+ "types": "../dts/Schema.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/SemVer.js",
3
+ "module": "../esm/SemVer.js",
4
+ "types": "../dts/SemVer.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/Template.js",
3
+ "module": "../esm/Template.js",
4
+ "types": "../dts/Template.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/TemplatePart.js",
3
+ "module": "../esm/TemplatePart.js",
4
+ "types": "../dts/TemplatePart.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/TemplateParts.js",
3
+ "module": "../esm/TemplateParts.js",
4
+ "types": "../dts/TemplateParts.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/TemplatePlaceholder.js",
3
+ "module": "../esm/TemplatePlaceholder.js",
4
+ "types": "../dts/TemplatePlaceholder.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../cjs/TemplateSeparator.js",
3
+ "module": "../esm/TemplateSeparator.js",
4
+ "types": "../dts/TemplateSeparator.d.ts"
5
+ }
package/README.md CHANGED
@@ -4,9 +4,9 @@
4
4
 
5
5
  An [`Effect`](https://effect.website/docs/introduction) library to partially replace the native javascript INTL API.
6
6
 
7
- Non machine-dependent, safe, bidirectional (implements parsing and formatting), tested, documented, with lots of examples, 100% Typescript, 100% functional.
7
+ Non machine-dependent, safe, bidirectional (implements parsing and formatting), tested, documented, with lots of examples, optimized for tree-shaking, 100% Typescript, 100% functional.
8
8
 
9
- Can also come in handy to non-`Effect` users.
9
+ Can also come in handy to non-Effect users.
10
10
 
11
11
  </div>
12
12
 
@@ -35,9 +35,25 @@ Depending on the package manager you use, run one of the following commands in y
35
35
  yarn add effect @parischap/effect-lib @parischap/conversions
36
36
  ```
37
37
 
38
- We use two peerDependencies. If you are not an `Effect` user, the size may seem important. But, in fact, we use little of each peerDependency. Bundled and tree-shaken, this module is only about [69kB](https://bundlephobia.com/package/@parischap/conversions). Minified and gzipped, it falls to [15kB](https://bundlephobia.com/package/@parischap/conversions)! (source bundlephobia).
38
+ ## Package size and tree-shaking
39
39
 
40
- Also, keep in mind that your bundler will tree-shake all which you don't use. For example, this package comes in esm and cjs versions, with Typescript typings. So if you don't use cjs, the size will be highly reduced. That's also true if you only use the DateTime parser/formatter and not the number parser/formatter...
40
+ This is a modern library optimized for tree-shaking. Don't put too much focus on package size: most of it will go away at bundling. To give you an idea of how this library will impact the size of your project, [Bundlephobia](https://bundlephobia.com/package/@parischap/ansi-styles) announces a size kB once minified and gzipped.
41
+
42
+ ## How to import?
43
+
44
+ This library supports named imports:
45
+
46
+ ```ts
47
+ import { CVRoundingOption } from "@parischap/conversions";
48
+ ```
49
+
50
+ and default imports:
51
+
52
+ ```ts
53
+ import * as CVRoundingOption from "@parischap/conversions/CVRoundingOption";
54
+ ```
55
+
56
+ In this documentation, we'll use the first option. But if you value tree-shaking, you should use the second.
41
57
 
42
58
  ## API
43
59
 
package/esm/BigDecimal.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /** A simple extension to the `Effect.BigDecimal` module */
2
- import { BigDecimal } from 'effect';
2
+ import * as BigDecimal from 'effect/BigDecimal';
3
3
  /**
4
4
  * Constructs a `BigDecimal` from a `CVReal`
5
5
  *
package/esm/BigInt.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /** A simple extension to the `Effect.BigInt` module */
2
- import { MBigInt } from '@parischap/effect-lib';
2
+ import * as MBigInt from '@parischap/effect-lib/MBigInt';
3
3
  /**
4
4
  * Constructs a `BigInt` from a `CVInteger`
5
5
  *
package/esm/DateTime.js CHANGED
@@ -18,8 +18,25 @@
18
18
  * which is equal to `t+zox3600`. All calculations are performed UTC using _zonedTimestamp instead
19
19
  * of timestamp.
20
20
  */
21
- import { MArray, MFunction, MInputError, MInspectable, MNumber, MPipeable, MStruct, MTypes } from '@parischap/effect-lib';
22
- import { DateTime, Either, Equal, Function, Hash, Number, Option, Predicate, Struct, flow, pipe } from 'effect';
21
+ import * as MArray from '@parischap/effect-lib/MArray';
22
+ import * as MFunction from '@parischap/effect-lib/MFunction';
23
+ import * as MInputError from '@parischap/effect-lib/MInputError';
24
+ import * as MInspectable from '@parischap/effect-lib/MInspectable';
25
+ import * as MNumber from '@parischap/effect-lib/MNumber';
26
+ import * as MPipeable from '@parischap/effect-lib/MPipeable';
27
+ import * as MStruct from '@parischap/effect-lib/MStruct';
28
+ import * as MTypes from '@parischap/effect-lib/MTypes';
29
+ import * as DateTime from 'effect/DateTime';
30
+ import * as Either from 'effect/Either';
31
+ import * as Equal from 'effect/Equal';
32
+ import * as Function from 'effect/Function';
33
+ import * as Hash from 'effect/Hash';
34
+ import * as Number from 'effect/Number';
35
+ import * as Option from 'effect/Option';
36
+ import * as Predicate from 'effect/Predicate';
37
+ import * as Struct from 'effect/Struct';
38
+ import {flow} from 'effect/Function';
39
+ import {pipe} from 'effect/Function';
23
40
  import * as CVNumberBase10Format from './NumberBase10Format.js';
24
41
  import * as CVTemplate from './Template.js';
25
42
  import * as CVTemplatePlaceholder from './TemplatePlaceholder.js';
@@ -3,8 +3,22 @@
3
3
  * dates. It supports many of the available unicode tokens (see
4
4
  * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).
5
5
  */
6
- import { MInspectable, MMatch, MPipeable, MString, MTypes } from '@parischap/effect-lib';
7
- import { Array, Either, flow, Function, HashMap, Option, pipe, Predicate, Record, Struct, Tuple } from 'effect';
6
+ import * as MInspectable from '@parischap/effect-lib/MInspectable';
7
+ import * as MMatch from '@parischap/effect-lib/MMatch';
8
+ import * as MPipeable from '@parischap/effect-lib/MPipeable';
9
+ import * as MString from '@parischap/effect-lib/MString';
10
+ import * as MTypes from '@parischap/effect-lib/MTypes';
11
+ import * as Array from 'effect/Array';
12
+ import * as Either from 'effect/Either';
13
+ import {flow} from 'effect/Function';
14
+ import * as Function from 'effect/Function';
15
+ import * as HashMap from 'effect/HashMap';
16
+ import * as Option from 'effect/Option';
17
+ import {pipe} from 'effect/Function';
18
+ import * as Predicate from 'effect/Predicate';
19
+ import * as Record from 'effect/Record';
20
+ import * as Struct from 'effect/Struct';
21
+ import * as Tuple from 'effect/Tuple';
8
22
  import * as CVDateTime from './DateTime.js';
9
23
  import * as CVTemplate from './Template.js';
10
24
  import * as CVTemplatePart from './TemplatePart.js';
@@ -3,8 +3,23 @@
3
3
  * (see DateTimeFormat.ts) to provide the translations used by language specific tokens (e.g.
4
4
  * `MMMM`)
5
5
  */
6
- import { MArray, MInputError, MInspectable, MPipeable, MPredicate, MString, MTypes } from '@parischap/effect-lib';
7
- import { Array, Either, flow, HashMap, Number, Option, pipe, Predicate, Struct, Tuple } from 'effect';
6
+ import * as MArray from '@parischap/effect-lib/MArray';
7
+ import * as MInputError from '@parischap/effect-lib/MInputError';
8
+ import * as MInspectable from '@parischap/effect-lib/MInspectable';
9
+ import * as MPipeable from '@parischap/effect-lib/MPipeable';
10
+ import * as MPredicate from '@parischap/effect-lib/MPredicate';
11
+ import * as MString from '@parischap/effect-lib/MString';
12
+ import * as MTypes from '@parischap/effect-lib/MTypes';
13
+ import * as Array from 'effect/Array';
14
+ import * as Either from 'effect/Either';
15
+ import {flow} from 'effect/Function';
16
+ import * as HashMap from 'effect/HashMap';
17
+ import * as Number from 'effect/Number';
18
+ import * as Option from 'effect/Option';
19
+ import {pipe} from 'effect/Function';
20
+ import * as Predicate from 'effect/Predicate';
21
+ import * as Struct from 'effect/Struct';
22
+ import * as Tuple from 'effect/Tuple';
8
23
  import * as CVDateTime from './DateTime.js';
9
24
  import * as CVNumberBase10Format from './NumberBase10Format.js';
10
25
  import * as CVReal from './Real.js';
package/esm/Email.js CHANGED
@@ -3,8 +3,9 @@
3
3
  * `Effect` documentation about Branding (https://effect.website/docs/code-style/branded-types/) if
4
4
  * you are not familiar with this concept.
5
5
  */
6
- import { MString } from '@parischap/effect-lib';
7
- import { Brand, Schema } from 'effect';
6
+ import * as MString from '@parischap/effect-lib/MString';
7
+ import * as Brand from 'effect/Brand';
8
+ import * as Schema from 'effect/Schema';
8
9
  /**
9
10
  * Module tag
10
11
  *
package/esm/Integer.js CHANGED
@@ -4,7 +4,12 @@
4
4
  * documentation about Branding (https://effect.website/docs/code-style/branded-types/) if you are
5
5
  * not familiar with this concept.
6
6
  */
7
- import { Brand, Either, flow, Function, Option, Schema } from 'effect';
7
+ import * as Brand from 'effect/Brand';
8
+ import * as Either from 'effect/Either';
9
+ import {flow} from 'effect/Function';
10
+ import * as Function from 'effect/Function';
11
+ import * as Option from 'effect/Option';
12
+ import * as Schema from 'effect/Schema';
8
13
  import * as CVInt from './internal/Int.js';
9
14
  import * as CVReal from './Real.js';
10
15
  /**
@@ -2,8 +2,31 @@
2
2
  * This module implements a `CVNumberBase10Format` which describes the possible options to
3
3
  * format/parse a base-10 number or `BigDecimal` and implements the formatting/parsing algortithms
4
4
  */
5
- import { MBigDecimal, MBigInt, MFunction, MInspectable, MMatch, MNumber, MPipeable, MPredicate, MRegExpString, MString, MStruct, MTypes } from '@parischap/effect-lib';
6
- import { Array, BigDecimal, BigInt, Either, flow, Function, Number, Option, pipe, Predicate, String, Struct, Tuple } from 'effect';
5
+ import * as MBigDecimal from '@parischap/effect-lib/MBigDecimal';
6
+ import * as MBigInt from '@parischap/effect-lib/MBigInt';
7
+ import * as MFunction from '@parischap/effect-lib/MFunction';
8
+ import * as MInspectable from '@parischap/effect-lib/MInspectable';
9
+ import * as MMatch from '@parischap/effect-lib/MMatch';
10
+ import * as MNumber from '@parischap/effect-lib/MNumber';
11
+ import * as MPipeable from '@parischap/effect-lib/MPipeable';
12
+ import * as MPredicate from '@parischap/effect-lib/MPredicate';
13
+ import * as MRegExpString from '@parischap/effect-lib/MRegExpString';
14
+ import * as MString from '@parischap/effect-lib/MString';
15
+ import * as MStruct from '@parischap/effect-lib/MStruct';
16
+ import * as MTypes from '@parischap/effect-lib/MTypes';
17
+ import * as Array from 'effect/Array';
18
+ import * as BigDecimal from 'effect/BigDecimal';
19
+ import * as BigInt from 'effect/BigInt';
20
+ import * as Either from 'effect/Either';
21
+ import {flow} from 'effect/Function';
22
+ import * as Function from 'effect/Function';
23
+ import * as Number from 'effect/Number';
24
+ import * as Option from 'effect/Option';
25
+ import {pipe} from 'effect/Function';
26
+ import * as Predicate from 'effect/Predicate';
27
+ import * as String from 'effect/String';
28
+ import * as Struct from 'effect/Struct';
29
+ import * as Tuple from 'effect/Tuple';
7
30
  import * as CVReal from './Real.js';
8
31
  import * as CVRoundingMode from './RoundingMode.js';
9
32
  import * as CVRoundingOption from './RoundingOption.js';
@@ -5,7 +5,12 @@
5
5
  * (https://effect.website/docs/code-style/branded-types/) if you are not familiar with this
6
6
  * concept.
7
7
  */
8
- import { Brand, Either, flow, Function, Option, Schema } from 'effect';
8
+ import * as Brand from 'effect/Brand';
9
+ import * as Either from 'effect/Either';
10
+ import {flow} from 'effect/Function';
11
+ import * as Function from 'effect/Function';
12
+ import * as Option from 'effect/Option';
13
+ import * as Schema from 'effect/Schema';
9
14
  import * as CVInteger from './Integer.js';
10
15
  import * as CVPositive from './internal/Positive.js';
11
16
  /**
@@ -4,8 +4,13 @@
4
4
  * documentation about Branding (https://effect.website/docs/code-style/branded-types/) if you are
5
5
  * not familiar with this concept.
6
6
  */
7
- import { MNumber } from '@parischap/effect-lib';
8
- import { Brand, Either, flow, Function, Option, Schema } from 'effect';
7
+ import * as MNumber from '@parischap/effect-lib/MNumber';
8
+ import * as Brand from 'effect/Brand';
9
+ import * as Either from 'effect/Either';
10
+ import {flow} from 'effect/Function';
11
+ import * as Function from 'effect/Function';
12
+ import * as Option from 'effect/Option';
13
+ import * as Schema from 'effect/Schema';
9
14
  import * as CVPositive from './internal/Positive.js';
10
15
  import * as CVReal from './Real.js';
11
16
  /**
package/esm/Real.js CHANGED
@@ -4,8 +4,11 @@
4
4
  * Branding (https://effect.website/docs/code-style/branded-types/) if you are not familiar with
5
5
  * this concept.
6
6
  */
7
- import { MNumber, MString } from '@parischap/effect-lib';
8
- import { Brand, flow, Schema } from 'effect';
7
+ import * as MNumber from '@parischap/effect-lib/MNumber';
8
+ import * as MString from '@parischap/effect-lib/MString';
9
+ import * as Brand from 'effect/Brand';
10
+ import {flow} from 'effect/Function';
11
+ import * as Schema from 'effect/Schema';
9
12
  /**
10
13
  * Module tag
11
14
  *
@@ -2,8 +2,10 @@
2
2
  * This module defines the list of available rounding modes (see Intl.NumberFormat) that can be used
3
3
  * by a `CVRoundingOption` (see RoundingOption.ts)
4
4
  */
5
- import { MMatch } from '@parischap/effect-lib';
6
- import { flow, Function, Struct } from 'effect';
5
+ import * as MMatch from '@parischap/effect-lib/MMatch';
6
+ import {flow} from 'effect/Function';
7
+ import * as Function from 'effect/Function';
8
+ import * as Struct from 'effect/Struct';
7
9
  /**
8
10
  * Type that represents the possible rounding modes
9
11
  *
@@ -2,8 +2,18 @@
2
2
  * This module implements a `CVRoundingOption` which describes the possible options to round a
3
3
  * number or `BigDecimal` and implements the rounding algortithm
4
4
  */
5
- import { MBigDecimal, MBigInt, MInspectable, MNumber, MPipeable, MTypes } from '@parischap/effect-lib';
6
- import { BigDecimal, Equal, Hash, pipe, Predicate, Struct } from 'effect';
5
+ import * as MBigDecimal from '@parischap/effect-lib/MBigDecimal';
6
+ import * as MBigInt from '@parischap/effect-lib/MBigInt';
7
+ import * as MInspectable from '@parischap/effect-lib/MInspectable';
8
+ import * as MNumber from '@parischap/effect-lib/MNumber';
9
+ import * as MPipeable from '@parischap/effect-lib/MPipeable';
10
+ import * as MTypes from '@parischap/effect-lib/MTypes';
11
+ import * as BigDecimal from 'effect/BigDecimal';
12
+ import * as Equal from 'effect/Equal';
13
+ import * as Hash from 'effect/Hash';
14
+ import {pipe} from 'effect/Function';
15
+ import * as Predicate from 'effect/Predicate';
16
+ import * as Struct from 'effect/Struct';
7
17
  import * as CVRoundingMode from './RoundingMode.js';
8
18
  /**
9
19
  * Module tag
package/esm/Schema.js CHANGED
@@ -2,8 +2,16 @@
2
2
  * An extension to the `Effect.Schema` module that adds Schema instances for number and date
3
3
  * formatting and parsing and implements new brands
4
4
  */
5
- import { MMatch, MTuple } from '@parischap/effect-lib';
6
- import { Array, Either, flow, Option, ParseResult, pipe, Record, Schema } from 'effect';
5
+ import * as MMatch from '@parischap/effect-lib/MMatch';
6
+ import * as MTuple from '@parischap/effect-lib/MTuple';
7
+ import * as Array from 'effect/Array';
8
+ import * as Either from 'effect/Either';
9
+ import {flow} from 'effect/Function';
10
+ import * as Option from 'effect/Option';
11
+ import * as ParseResult from 'effect/ParseResult';
12
+ import {pipe} from 'effect/Function';
13
+ import * as Record from 'effect/Record';
14
+ import * as Schema from 'effect/Schema';
7
15
  import * as CVDateTime from './DateTime.js';
8
16
  import * as CVDateTimeFormat from './DateTimeFormat.js';
9
17
  import * as CVEmail from './Email.js';
package/esm/SemVer.js CHANGED
@@ -4,8 +4,9 @@
4
4
  * (https://effect.website/docs/code-style/branded-types/) if you are not familiar with this
5
5
  * concept.
6
6
  */
7
- import { MString } from '@parischap/effect-lib';
8
- import { Brand, Schema } from 'effect';
7
+ import * as MString from '@parischap/effect-lib/MString';
8
+ import * as Brand from 'effect/Brand';
9
+ import * as Schema from 'effect/Schema';
9
10
  /**
10
11
  * Module tag
11
12
  *
package/esm/Template.js CHANGED
@@ -43,8 +43,22 @@
43
43
  * Schema.NumberFromString)` does not work as the first NumberFromString combinator reads the whole
44
44
  * date
45
45
  */
46
- import { MInputError, MInspectable, MPipeable, MString, MTuple, MTypes } from '@parischap/effect-lib';
47
- import { Array, Either, Equal, flow, Function, Option, pipe, Predicate, Record, Struct } from 'effect';
46
+ import * as MInputError from '@parischap/effect-lib/MInputError';
47
+ import * as MInspectable from '@parischap/effect-lib/MInspectable';
48
+ import * as MPipeable from '@parischap/effect-lib/MPipeable';
49
+ import * as MString from '@parischap/effect-lib/MString';
50
+ import * as MTuple from '@parischap/effect-lib/MTuple';
51
+ import * as MTypes from '@parischap/effect-lib/MTypes';
52
+ import * as Array from 'effect/Array';
53
+ import * as Either from 'effect/Either';
54
+ import * as Equal from 'effect/Equal';
55
+ import {flow} from 'effect/Function';
56
+ import * as Function from 'effect/Function';
57
+ import * as Option from 'effect/Option';
58
+ import {pipe} from 'effect/Function';
59
+ import * as Predicate from 'effect/Predicate';
60
+ import * as Record from 'effect/Record';
61
+ import * as Struct from 'effect/Struct';
48
62
  import * as CVTemplatePart from './TemplatePart.js';
49
63
  import * as CVTemplateParts from './TemplateParts.js';
50
64
  import * as CVTemplateSeparator from './TemplateSeparator.js';
@@ -1,6 +1,9 @@
1
1
  /** This module implements an array of `CVTemplatePart`'s (see TemplatePart.ts) */
2
- import { MMatch } from '@parischap/effect-lib';
3
- import { Array, flow, Function, Option } from 'effect';
2
+ import * as MMatch from '@parischap/effect-lib/MMatch';
3
+ import * as Array from 'effect/Array';
4
+ import {flow} from 'effect/Function';
5
+ import * as Function from 'effect/Function';
6
+ import * as Option from 'effect/Option';
4
7
  import * as CVTemplatePart from './TemplatePart.js';
5
8
  import * as CVTemplatePlaceholder from './TemplatePlaceholder.js';
6
9
  import * as CVTemplateSeparator from './TemplateSeparator.js';
@@ -11,8 +11,26 @@
11
11
  * the result is coherent and, if so, returns a `Right` of that string. Otherwise, it returns a
12
12
  * `Left`
13
13
  */
14
- import { MInputError, MInspectable, MPipeable, MRegExp, MRegExpString, MString, MStruct, MTuple, MTypes } from '@parischap/effect-lib';
15
- import { Array, Either, flow, Function, HashMap, pipe, Predicate, Schema, String, Struct, Tuple } from 'effect';
14
+ import * as MInputError from '@parischap/effect-lib/MInputError';
15
+ import * as MInspectable from '@parischap/effect-lib/MInspectable';
16
+ import * as MPipeable from '@parischap/effect-lib/MPipeable';
17
+ import * as MRegExp from '@parischap/effect-lib/MRegExp';
18
+ import * as MRegExpString from '@parischap/effect-lib/MRegExpString';
19
+ import * as MString from '@parischap/effect-lib/MString';
20
+ import * as MStruct from '@parischap/effect-lib/MStruct';
21
+ import * as MTuple from '@parischap/effect-lib/MTuple';
22
+ import * as MTypes from '@parischap/effect-lib/MTypes';
23
+ import * as Array from 'effect/Array';
24
+ import * as Either from 'effect/Either';
25
+ import {flow} from 'effect/Function';
26
+ import * as Function from 'effect/Function';
27
+ import * as HashMap from 'effect/HashMap';
28
+ import {pipe} from 'effect/Function';
29
+ import * as Predicate from 'effect/Predicate';
30
+ import * as Schema from 'effect/Schema';
31
+ import * as String from 'effect/String';
32
+ import * as Struct from 'effect/Struct';
33
+ import * as Tuple from 'effect/Tuple';
16
34
  import * as CVNumberBase10Format from './NumberBase10Format.js';
17
35
  import * as CVReal from './Real.js';
18
36
  /**
@@ -2,8 +2,15 @@
2
2
  * This module implements a `CVTemplateSeparator` type which is one of the constituents of
3
3
  * `CVTemplate`'s (see Template.ts and TemplatePart.ts)
4
4
  */
5
- import { MInputError, MInspectable, MPipeable, MString, MTypes } from '@parischap/effect-lib';
6
- import { Either, pipe, Predicate, Struct } from 'effect';
5
+ import * as MInputError from '@parischap/effect-lib/MInputError';
6
+ import * as MInspectable from '@parischap/effect-lib/MInspectable';
7
+ import * as MPipeable from '@parischap/effect-lib/MPipeable';
8
+ import * as MString from '@parischap/effect-lib/MString';
9
+ import * as MTypes from '@parischap/effect-lib/MTypes';
10
+ import * as Either from 'effect/Either';
11
+ import {pipe} from 'effect/Function';
12
+ import * as Predicate from 'effect/Predicate';
13
+ import * as Struct from 'effect/Struct';
7
14
  /**
8
15
  * Module tag
9
16
  *
package/package.json CHANGED
@@ -40,10 +40,110 @@
40
40
  "default": "./cjs/index.js",
41
41
  "import": "./esm/index.js",
42
42
  "types": "./dts/index.d.ts"
43
+ },
44
+ "./CVBigDecimal": {
45
+ "types": "./dts/BigDecimal.d.ts",
46
+ "import": "./esm/BigDecimal.js",
47
+ "default": "./cjs/BigDecimal.js"
48
+ },
49
+ "./CVBigInt": {
50
+ "types": "./dts/BigInt.d.ts",
51
+ "import": "./esm/BigInt.js",
52
+ "default": "./cjs/BigInt.js"
53
+ },
54
+ "./CVDateTime": {
55
+ "types": "./dts/DateTime.d.ts",
56
+ "import": "./esm/DateTime.js",
57
+ "default": "./cjs/DateTime.js"
58
+ },
59
+ "./CVDateTimeFormat": {
60
+ "types": "./dts/DateTimeFormat.d.ts",
61
+ "import": "./esm/DateTimeFormat.js",
62
+ "default": "./cjs/DateTimeFormat.js"
63
+ },
64
+ "./CVDateTimeFormatContext": {
65
+ "types": "./dts/DateTimeFormatContext.d.ts",
66
+ "import": "./esm/DateTimeFormatContext.js",
67
+ "default": "./cjs/DateTimeFormatContext.js"
68
+ },
69
+ "./CVEmail": {
70
+ "types": "./dts/Email.d.ts",
71
+ "import": "./esm/Email.js",
72
+ "default": "./cjs/Email.js"
73
+ },
74
+ "./CVInteger": {
75
+ "types": "./dts/Integer.d.ts",
76
+ "import": "./esm/Integer.js",
77
+ "default": "./cjs/Integer.js"
78
+ },
79
+ "./CVNumberBase10Format": {
80
+ "types": "./dts/NumberBase10Format.d.ts",
81
+ "import": "./esm/NumberBase10Format.js",
82
+ "default": "./cjs/NumberBase10Format.js"
83
+ },
84
+ "./CVPositiveInteger": {
85
+ "types": "./dts/PositiveInteger.d.ts",
86
+ "import": "./esm/PositiveInteger.js",
87
+ "default": "./cjs/PositiveInteger.js"
88
+ },
89
+ "./CVPositiveReal": {
90
+ "types": "./dts/PositiveReal.d.ts",
91
+ "import": "./esm/PositiveReal.js",
92
+ "default": "./cjs/PositiveReal.js"
93
+ },
94
+ "./CVReal": {
95
+ "types": "./dts/Real.d.ts",
96
+ "import": "./esm/Real.js",
97
+ "default": "./cjs/Real.js"
98
+ },
99
+ "./CVRoundingMode": {
100
+ "types": "./dts/RoundingMode.d.ts",
101
+ "import": "./esm/RoundingMode.js",
102
+ "default": "./cjs/RoundingMode.js"
103
+ },
104
+ "./CVRoundingOption": {
105
+ "types": "./dts/RoundingOption.d.ts",
106
+ "import": "./esm/RoundingOption.js",
107
+ "default": "./cjs/RoundingOption.js"
108
+ },
109
+ "./CVSchema": {
110
+ "types": "./dts/Schema.d.ts",
111
+ "import": "./esm/Schema.js",
112
+ "default": "./cjs/Schema.js"
113
+ },
114
+ "./CVSemVer": {
115
+ "types": "./dts/SemVer.d.ts",
116
+ "import": "./esm/SemVer.js",
117
+ "default": "./cjs/SemVer.js"
118
+ },
119
+ "./CVTemplate": {
120
+ "types": "./dts/Template.d.ts",
121
+ "import": "./esm/Template.js",
122
+ "default": "./cjs/Template.js"
123
+ },
124
+ "./CVTemplatePart": {
125
+ "types": "./dts/TemplatePart.d.ts",
126
+ "import": "./esm/TemplatePart.js",
127
+ "default": "./cjs/TemplatePart.js"
128
+ },
129
+ "./CVTemplateParts": {
130
+ "types": "./dts/TemplateParts.d.ts",
131
+ "import": "./esm/TemplateParts.js",
132
+ "default": "./cjs/TemplateParts.js"
133
+ },
134
+ "./CVTemplatePlaceholder": {
135
+ "types": "./dts/TemplatePlaceholder.d.ts",
136
+ "import": "./esm/TemplatePlaceholder.js",
137
+ "default": "./cjs/TemplatePlaceholder.js"
138
+ },
139
+ "./CVTemplateSeparator": {
140
+ "types": "./dts/TemplateSeparator.d.ts",
141
+ "import": "./esm/TemplateSeparator.js",
142
+ "default": "./cjs/TemplateSeparator.js"
43
143
  }
44
144
  },
45
145
  "peerDependencies": {
46
- "@parischap/effect-lib": "^0.7.0",
146
+ "@parischap/effect-lib": "^0.11.0",
47
147
  "effect": "^3.17.13"
48
148
  },
49
149
  "repository": {
@@ -52,7 +152,7 @@
52
152
  "directory": "packages/conversions"
53
153
  },
54
154
  "homepage": "https://github.com/parischap/effect-libs/tree/master/packages/conversions",
55
- "version": "0.5.0",
155
+ "version": "0.7.0",
56
156
  "main": "./cjs/index.js",
57
157
  "types": "./dts/index.d.ts"
58
158
  }