@nlozgachev/pipelined 0.43.0 → 0.45.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/dist/index.mjs CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  uncurry,
28
28
  uncurry3,
29
29
  uncurry4
30
- } from "./chunk-X6XQX3OZ.mjs";
30
+ } from "./chunk-KOYYDQH4.mjs";
31
31
  import {
32
32
  Arr,
33
33
  Dict,
@@ -35,7 +35,7 @@ import {
35
35
  Rec,
36
36
  Str,
37
37
  Uniq
38
- } from "./chunk-W6RWKBDX.mjs";
38
+ } from "./chunk-2LKJF45J.mjs";
39
39
  import {
40
40
  Combinable,
41
41
  Deferred,
@@ -55,14 +55,17 @@ import {
55
55
  Result,
56
56
  State,
57
57
  Task,
58
+ TaskMaybe,
59
+ TaskResult,
60
+ TaskValidation,
58
61
  These,
59
62
  Tuple,
60
63
  Validation
61
- } from "./chunk-CHRXZIJU.mjs";
64
+ } from "./chunk-VSU36S2K.mjs";
62
65
  import {
63
66
  Brand,
64
67
  Duration
65
- } from "./chunk-74JKKJ4R.mjs";
68
+ } from "./chunk-XTVF5R6R.mjs";
66
69
  export {
67
70
  Arr,
68
71
  Brand,
@@ -89,6 +92,9 @@ export {
89
92
  State,
90
93
  Str,
91
94
  Task,
95
+ TaskMaybe,
96
+ TaskResult,
97
+ TaskValidation,
92
98
  These,
93
99
  Tuple,
94
100
  Uniq,
package/dist/types.d.mts CHANGED
@@ -59,7 +59,7 @@ declare namespace Brand {
59
59
  * const twoSeconds = Duration.seconds(2);
60
60
  * const total = pipe(halfSecond, Duration.add(twoSeconds));
61
61
  *
62
- * Duration.toSeconds(total); // 2.5
62
+ * Duration.to.seconds(total); // 2.5
63
63
  * ```
64
64
  */
65
65
  type Duration = Brand<"Duration", number>;
@@ -84,26 +84,28 @@ declare namespace Duration {
84
84
  * Creates a Duration from days.
85
85
  */
86
86
  const days: (d: number) => Duration;
87
- /**
88
- * Converts a Duration back to raw milliseconds.
89
- */
90
- const toMilliseconds: (d: Duration) => number;
91
- /**
92
- * Converts a Duration to seconds.
93
- */
94
- const toSeconds: (d: Duration) => number;
95
- /**
96
- * Converts a Duration to minutes.
97
- */
98
- const toMinutes: (d: Duration) => number;
99
- /**
100
- * Converts a Duration to hours.
101
- */
102
- const toHours: (d: Duration) => number;
103
- /**
104
- * Converts a Duration to days.
105
- */
106
- const toDays: (d: Duration) => number;
87
+ namespace to {
88
+ /**
89
+ * Converts a Duration back to raw milliseconds.
90
+ */
91
+ const milliseconds: (d: Duration) => number;
92
+ /**
93
+ * Converts a Duration to seconds.
94
+ */
95
+ const seconds: (d: Duration) => number;
96
+ /**
97
+ * Converts a Duration to minutes.
98
+ */
99
+ const minutes: (d: Duration) => number;
100
+ /**
101
+ * Converts a Duration to hours.
102
+ */
103
+ const hours: (d: Duration) => number;
104
+ /**
105
+ * Converts a Duration to days.
106
+ */
107
+ const days: (d: Duration) => number;
108
+ }
107
109
  /**
108
110
  * Adds two Durations together.
109
111
  *
package/dist/types.d.ts CHANGED
@@ -59,7 +59,7 @@ declare namespace Brand {
59
59
  * const twoSeconds = Duration.seconds(2);
60
60
  * const total = pipe(halfSecond, Duration.add(twoSeconds));
61
61
  *
62
- * Duration.toSeconds(total); // 2.5
62
+ * Duration.to.seconds(total); // 2.5
63
63
  * ```
64
64
  */
65
65
  type Duration = Brand<"Duration", number>;
@@ -84,26 +84,28 @@ declare namespace Duration {
84
84
  * Creates a Duration from days.
85
85
  */
86
86
  const days: (d: number) => Duration;
87
- /**
88
- * Converts a Duration back to raw milliseconds.
89
- */
90
- const toMilliseconds: (d: Duration) => number;
91
- /**
92
- * Converts a Duration to seconds.
93
- */
94
- const toSeconds: (d: Duration) => number;
95
- /**
96
- * Converts a Duration to minutes.
97
- */
98
- const toMinutes: (d: Duration) => number;
99
- /**
100
- * Converts a Duration to hours.
101
- */
102
- const toHours: (d: Duration) => number;
103
- /**
104
- * Converts a Duration to days.
105
- */
106
- const toDays: (d: Duration) => number;
87
+ namespace to {
88
+ /**
89
+ * Converts a Duration back to raw milliseconds.
90
+ */
91
+ const milliseconds: (d: Duration) => number;
92
+ /**
93
+ * Converts a Duration to seconds.
94
+ */
95
+ const seconds: (d: Duration) => number;
96
+ /**
97
+ * Converts a Duration to minutes.
98
+ */
99
+ const minutes: (d: Duration) => number;
100
+ /**
101
+ * Converts a Duration to hours.
102
+ */
103
+ const hours: (d: Duration) => number;
104
+ /**
105
+ * Converts a Duration to days.
106
+ */
107
+ const days: (d: Duration) => number;
108
+ }
107
109
  /**
108
110
  * Adds two Durations together.
109
111
  *
package/dist/types.js CHANGED
@@ -41,11 +41,14 @@ var Duration;
41
41
  Duration2.minutes = (m) => wrap(m * 60 * 1e3);
42
42
  Duration2.hours = (h) => wrap(h * 60 * 60 * 1e3);
43
43
  Duration2.days = (d) => wrap(d * 24 * 60 * 60 * 1e3);
44
- Duration2.toMilliseconds = (d) => Brand.unwrap(d);
45
- Duration2.toSeconds = (d) => Brand.unwrap(d) / 1e3;
46
- Duration2.toMinutes = (d) => Brand.unwrap(d) / (60 * 1e3);
47
- Duration2.toHours = (d) => Brand.unwrap(d) / (60 * 60 * 1e3);
48
- Duration2.toDays = (d) => Brand.unwrap(d) / (24 * 60 * 60 * 1e3);
44
+ let to;
45
+ ((to2) => {
46
+ to2.milliseconds = (d) => Brand.unwrap(d);
47
+ to2.seconds = (d) => Brand.unwrap(d) / 1e3;
48
+ to2.minutes = (d) => Brand.unwrap(d) / (60 * 1e3);
49
+ to2.hours = (d) => Brand.unwrap(d) / (60 * 60 * 1e3);
50
+ to2.days = (d) => Brand.unwrap(d) / (24 * 60 * 60 * 1e3);
51
+ })(to = Duration2.to || (Duration2.to = {}));
49
52
  Duration2.add = (other) => (self) => wrap(Brand.unwrap(self) + Brand.unwrap(other));
50
53
  Duration2.subtract = (other) => (self) => wrap(Brand.unwrap(self) - Brand.unwrap(other));
51
54
  })(Duration || (Duration = {}));
package/dist/types.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Brand,
3
3
  Duration
4
- } from "./chunk-74JKKJ4R.mjs";
4
+ } from "./chunk-XTVF5R6R.mjs";
5
5
  export {
6
6
  Brand,
7
7
  Duration