@nlozgachev/pipelined 0.39.0 → 0.40.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 CHANGED
@@ -33,7 +33,7 @@ not anything is there:
33
33
  ```ts
34
34
  import { pipe } from "@nlozgachev/pipelined/composition";
35
35
  import { Maybe } from "@nlozgachev/pipelined/core";
36
- import { Num, Str } from "@nlozgachev/pipelined/utils";
36
+ import { Num, Str } from "@nlozgachev/pipelined/data";
37
37
 
38
38
  const parseDiscount = (raw: string): string =>
39
39
  pipe(
@@ -120,7 +120,7 @@ steps to compose naturally with the core types:
120
120
  ```ts
121
121
  import { pipe } from "@nlozgachev/pipelined/composition";
122
122
  import { Maybe } from "@nlozgachev/pipelined/core";
123
- import { Arr, Num, Rec, Str } from "@nlozgachev/pipelined/utils";
123
+ import { Arr, Num, Rec, Str } from "@nlozgachev/pipelined/data";
124
124
 
125
125
  type RawItem = { name: string; price: string; category: string };
126
126
  type Item = { name: string; price: number; category: string };
@@ -8,7 +8,7 @@ import {
8
8
  isNonEmptyList
9
9
  } from "./chunk-5AFEEFE4.mjs";
10
10
 
11
- // src/Utils/Arr.ts
11
+ // src/Data/Arr.ts
12
12
  var Arr;
13
13
  ((Arr2) => {
14
14
  Arr2.head = (data) => data.length > 0 ? Maybe.some(data[0]) : Maybe.none();
@@ -340,7 +340,7 @@ var Arr;
340
340
  };
341
341
  })(Arr || (Arr = {}));
342
342
 
343
- // src/Utils/Dict.ts
343
+ // src/Data/Dict.ts
344
344
  var Dict;
345
345
  ((Dict2) => {
346
346
  Dict2.empty = () => new globalThis.Map();
@@ -478,7 +478,7 @@ var Dict;
478
478
  Dict2.toRecord = (m) => Object.fromEntries(m);
479
479
  })(Dict || (Dict = {}));
480
480
 
481
- // src/Utils/Num.ts
481
+ // src/Data/Num.ts
482
482
  var Num;
483
483
  ((Num2) => {
484
484
  Num2.range = (from, to, step = 1) => {
@@ -545,7 +545,7 @@ var Num;
545
545
  };
546
546
  })(Num || (Num = {}));
547
547
 
548
- // src/Utils/Rec.ts
548
+ // src/Data/Rec.ts
549
549
  var Rec;
550
550
  ((Rec2) => {
551
551
  Rec2.map = (f) => (data) => {
@@ -673,7 +673,7 @@ var Rec;
673
673
  };
674
674
  })(Rec || (Rec = {}));
675
675
 
676
- // src/Utils/Str.ts
676
+ // src/Data/Str.ts
677
677
  var Str;
678
678
  ((Str2) => {
679
679
  Str2.split = (separator) => (s) => s.split(separator);
@@ -733,7 +733,7 @@ var Str;
733
733
  };
734
734
  })(Str || (Str = {}));
735
735
 
736
- // src/Utils/Uniq.ts
736
+ // src/Data/Uniq.ts
737
737
  var Uniq;
738
738
  ((Uniq2) => {
739
739
  Uniq2.empty = () => new globalThis.Set();
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { and, compose, constFalse, constNull, constTrue, constUndefined, constVoid, constant, converge, curry, curry3, curry4, defaultTo, flip, flow, identity, juxt, memoize, memoizeWeak, not, on, once, or, pipe, tap, uncurry, uncurry3, uncurry4 } from './composition.mjs';
2
2
  export { Combinable, Failed, Failure, Lazy, Lens, Loading, Logged, NotAsked, Op, Optional, Passed, Predicate, Reader, Refinement, RemoteData, Resource, State, Success, TaskMaybe, TaskResult, TaskValidation, These, TheseBoth, TheseFirst, TheseSecond, Tuple, Validation } from './core.mjs';
3
3
  export { D as Deferred, E as Equality, a as Err, M as Maybe, N as None, O as Ok, b as Ordering, R as Result, S as Some, T as Task } from './Task-DcXhCZYg.mjs';
4
- export { Brand, Duration, NonEmptyList, isNonEmptyList } from './types.mjs';
5
4
  export { Arr, Dict, Num, Rec, Str, Uniq } from './utils.mjs';
5
+ export { Brand, Duration, NonEmptyList, isNonEmptyList } from './types.mjs';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { and, compose, constFalse, constNull, constTrue, constUndefined, constVoid, constant, converge, curry, curry3, curry4, defaultTo, flip, flow, identity, juxt, memoize, memoizeWeak, not, on, once, or, pipe, tap, uncurry, uncurry3, uncurry4 } from './composition.js';
2
2
  export { Combinable, Failed, Failure, Lazy, Lens, Loading, Logged, NotAsked, Op, Optional, Passed, Predicate, Reader, Refinement, RemoteData, Resource, State, Success, TaskMaybe, TaskResult, TaskValidation, These, TheseBoth, TheseFirst, TheseSecond, Tuple, Validation } from './core.js';
3
3
  export { D as Deferred, E as Equality, a as Err, M as Maybe, N as None, O as Ok, b as Ordering, R as Result, S as Some, T as Task } from './Task-uupX7xd9.js';
4
- export { Brand, Duration, NonEmptyList, isNonEmptyList } from './types.js';
5
4
  export { Arr, Dict, Num, Rec, Str, Uniq } from './utils.js';
5
+ export { Brand, Duration, NonEmptyList, isNonEmptyList } from './types.js';
package/dist/index.js CHANGED
@@ -2549,7 +2549,7 @@ var Validation;
2549
2549
  };
2550
2550
  })(Validation || (Validation = {}));
2551
2551
 
2552
- // src/Utils/Arr.ts
2552
+ // src/Data/Arr.ts
2553
2553
  var Arr;
2554
2554
  ((Arr2) => {
2555
2555
  Arr2.head = (data) => data.length > 0 ? Maybe.some(data[0]) : Maybe.none();
@@ -2881,7 +2881,7 @@ var Arr;
2881
2881
  };
2882
2882
  })(Arr || (Arr = {}));
2883
2883
 
2884
- // src/Utils/Dict.ts
2884
+ // src/Data/Dict.ts
2885
2885
  var Dict;
2886
2886
  ((Dict2) => {
2887
2887
  Dict2.empty = () => new globalThis.Map();
@@ -3019,7 +3019,7 @@ var Dict;
3019
3019
  Dict2.toRecord = (m) => Object.fromEntries(m);
3020
3020
  })(Dict || (Dict = {}));
3021
3021
 
3022
- // src/Utils/Num.ts
3022
+ // src/Data/Num.ts
3023
3023
  var Num;
3024
3024
  ((Num2) => {
3025
3025
  Num2.range = (from, to, step = 1) => {
@@ -3086,7 +3086,7 @@ var Num;
3086
3086
  };
3087
3087
  })(Num || (Num = {}));
3088
3088
 
3089
- // src/Utils/Rec.ts
3089
+ // src/Data/Rec.ts
3090
3090
  var Rec;
3091
3091
  ((Rec2) => {
3092
3092
  Rec2.map = (f) => (data) => {
@@ -3214,7 +3214,7 @@ var Rec;
3214
3214
  };
3215
3215
  })(Rec || (Rec = {}));
3216
3216
 
3217
- // src/Utils/Str.ts
3217
+ // src/Data/Str.ts
3218
3218
  var Str;
3219
3219
  ((Str2) => {
3220
3220
  Str2.split = (separator) => (s) => s.split(separator);
@@ -3274,7 +3274,7 @@ var Str;
3274
3274
  };
3275
3275
  })(Str || (Str = {}));
3276
3276
 
3277
- // src/Utils/Uniq.ts
3277
+ // src/Data/Uniq.ts
3278
3278
  var Uniq;
3279
3279
  ((Uniq2) => {
3280
3280
  Uniq2.empty = () => new globalThis.Set();
package/dist/index.mjs CHANGED
@@ -35,7 +35,7 @@ import {
35
35
  Rec,
36
36
  Str,
37
37
  Uniq
38
- } from "./chunk-GTJ2YCYY.mjs";
38
+ } from "./chunk-BQKKTTJS.mjs";
39
39
  import {
40
40
  Combinable,
41
41
  Deferred,
package/dist/utils.d.mts CHANGED
@@ -523,7 +523,7 @@ declare namespace Arr {
523
523
  *
524
524
  * @example
525
525
  * ```ts
526
- * import { Dict } from "@nlozgachev/pipelined/utils";
526
+ * import { Dict } from "@nlozgachev/pipelined/data";
527
527
  * import { pipe } from "@nlozgachev/pipelined/composition";
528
528
  *
529
529
  * const scores = pipe(
@@ -844,7 +844,7 @@ declare namespace Dict {
844
844
  *
845
845
  * @example
846
846
  * ```ts
847
- * import { Num } from "@nlozgachev/pipelined/utils";
847
+ * import { Num } from "@nlozgachev/pipelined/data";
848
848
  * import { pipe } from "@nlozgachev/pipelined/composition";
849
849
  *
850
850
  * pipe(
@@ -1215,7 +1215,7 @@ declare namespace Rec {
1215
1215
  *
1216
1216
  * @example
1217
1217
  * ```ts
1218
- * import { Str } from "@nlozgachev/pipelined/utils";
1218
+ * import { Str } from "@nlozgachev/pipelined/data";
1219
1219
  * import { pipe } from "@nlozgachev/pipelined/composition";
1220
1220
  *
1221
1221
  * pipe(" Hello, World! ", Str.trim, Str.toLowerCase); // "hello, world!"
@@ -1443,7 +1443,7 @@ declare namespace Str {
1443
1443
  *
1444
1444
  * @example
1445
1445
  * ```ts
1446
- * import { Uniq } from "@nlozgachev/pipelined/utils";
1446
+ * import { Uniq } from "@nlozgachev/pipelined/data";
1447
1447
  * import { pipe } from "@nlozgachev/pipelined/composition";
1448
1448
  *
1449
1449
  * const active = pipe(
package/dist/utils.d.ts CHANGED
@@ -523,7 +523,7 @@ declare namespace Arr {
523
523
  *
524
524
  * @example
525
525
  * ```ts
526
- * import { Dict } from "@nlozgachev/pipelined/utils";
526
+ * import { Dict } from "@nlozgachev/pipelined/data";
527
527
  * import { pipe } from "@nlozgachev/pipelined/composition";
528
528
  *
529
529
  * const scores = pipe(
@@ -844,7 +844,7 @@ declare namespace Dict {
844
844
  *
845
845
  * @example
846
846
  * ```ts
847
- * import { Num } from "@nlozgachev/pipelined/utils";
847
+ * import { Num } from "@nlozgachev/pipelined/data";
848
848
  * import { pipe } from "@nlozgachev/pipelined/composition";
849
849
  *
850
850
  * pipe(
@@ -1215,7 +1215,7 @@ declare namespace Rec {
1215
1215
  *
1216
1216
  * @example
1217
1217
  * ```ts
1218
- * import { Str } from "@nlozgachev/pipelined/utils";
1218
+ * import { Str } from "@nlozgachev/pipelined/data";
1219
1219
  * import { pipe } from "@nlozgachev/pipelined/composition";
1220
1220
  *
1221
1221
  * pipe(" Hello, World! ", Str.trim, Str.toLowerCase); // "hello, world!"
@@ -1443,7 +1443,7 @@ declare namespace Str {
1443
1443
  *
1444
1444
  * @example
1445
1445
  * ```ts
1446
- * import { Uniq } from "@nlozgachev/pipelined/utils";
1446
+ * import { Uniq } from "@nlozgachev/pipelined/data";
1447
1447
  * import { pipe } from "@nlozgachev/pipelined/composition";
1448
1448
  *
1449
1449
  * const active = pipe(
package/dist/utils.js CHANGED
@@ -17,9 +17,9 @@ var __copyProps = (to, from, except, desc) => {
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
- // src/Utils/index.ts
21
- var Utils_exports = {};
22
- __export(Utils_exports, {
20
+ // src/Data/index.ts
21
+ var Data_exports = {};
22
+ __export(Data_exports, {
23
23
  Arr: () => Arr,
24
24
  Dict: () => Dict,
25
25
  Num: () => Num,
@@ -27,7 +27,7 @@ __export(Utils_exports, {
27
27
  Str: () => Str,
28
28
  Uniq: () => Uniq
29
29
  });
30
- module.exports = __toCommonJS(Utils_exports);
30
+ module.exports = __toCommonJS(Data_exports);
31
31
 
32
32
  // src/Core/Deferred.ts
33
33
  var Deferred;
@@ -407,7 +407,7 @@ var Task;
407
407
  )(data);
408
408
  })(Task || (Task = {}));
409
409
 
410
- // src/Utils/Arr.ts
410
+ // src/Data/Arr.ts
411
411
  var Arr;
412
412
  ((Arr2) => {
413
413
  Arr2.head = (data) => data.length > 0 ? Maybe.some(data[0]) : Maybe.none();
@@ -739,7 +739,7 @@ var Arr;
739
739
  };
740
740
  })(Arr || (Arr = {}));
741
741
 
742
- // src/Utils/Dict.ts
742
+ // src/Data/Dict.ts
743
743
  var Dict;
744
744
  ((Dict2) => {
745
745
  Dict2.empty = () => new globalThis.Map();
@@ -877,7 +877,7 @@ var Dict;
877
877
  Dict2.toRecord = (m) => Object.fromEntries(m);
878
878
  })(Dict || (Dict = {}));
879
879
 
880
- // src/Utils/Num.ts
880
+ // src/Data/Num.ts
881
881
  var Num;
882
882
  ((Num2) => {
883
883
  Num2.range = (from, to, step = 1) => {
@@ -944,7 +944,7 @@ var Num;
944
944
  };
945
945
  })(Num || (Num = {}));
946
946
 
947
- // src/Utils/Rec.ts
947
+ // src/Data/Rec.ts
948
948
  var Rec;
949
949
  ((Rec2) => {
950
950
  Rec2.map = (f) => (data) => {
@@ -1072,7 +1072,7 @@ var Rec;
1072
1072
  };
1073
1073
  })(Rec || (Rec = {}));
1074
1074
 
1075
- // src/Utils/Str.ts
1075
+ // src/Data/Str.ts
1076
1076
  var Str;
1077
1077
  ((Str2) => {
1078
1078
  Str2.split = (separator) => (s) => s.split(separator);
@@ -1132,7 +1132,7 @@ var Str;
1132
1132
  };
1133
1133
  })(Str || (Str = {}));
1134
1134
 
1135
- // src/Utils/Uniq.ts
1135
+ // src/Data/Uniq.ts
1136
1136
  var Uniq;
1137
1137
  ((Uniq2) => {
1138
1138
  Uniq2.empty = () => new globalThis.Set();
package/dist/utils.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  Rec,
6
6
  Str,
7
7
  Uniq
8
- } from "./chunk-GTJ2YCYY.mjs";
8
+ } from "./chunk-BQKKTTJS.mjs";
9
9
  import "./chunk-4R4XUP4M.mjs";
10
10
  import "./chunk-5AFEEFE4.mjs";
11
11
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nlozgachev/pipelined",
3
- "version": "0.39.0",
3
+ "version": "0.40.0",
4
4
  "description": "Opinionated functional abstractions for TypeScript",
5
5
  "license": "BSD-3-Clause",
6
6
  "homepage": "https://pipelined.lozgachev.dev",
@@ -25,7 +25,7 @@
25
25
  ],
26
26
  "imports": {
27
27
  "#core": "./src/Core/index.ts",
28
- "#utils": "./src/Utils/index.ts",
28
+ "#data": "./src/Data/index.ts",
29
29
  "#types": "./src/Types/index.ts",
30
30
  "#composition": "./src/Composition/index.ts",
31
31
  "#internal": "./src/internal/index.ts"