@duplojs/utils 1.1.9 → 1.1.10

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 (198) hide show
  1. package/dist/array/reduce.cjs +1 -0
  2. package/dist/array/reduce.mjs +1 -0
  3. package/dist/array/reduceRight.cjs +1 -0
  4. package/dist/array/reduceRight.mjs +1 -0
  5. package/dist/common/builder.cjs +70 -0
  6. package/dist/common/builder.d.ts +34 -0
  7. package/dist/common/builder.mjs +66 -0
  8. package/dist/common/index.d.ts +1 -0
  9. package/dist/common/instanceOf.cjs +1 -0
  10. package/dist/common/instanceOf.mjs +1 -0
  11. package/dist/common/kind.d.ts +3 -2
  12. package/dist/dataParser/base.cjs +1 -0
  13. package/dist/dataParser/base.d.ts +2 -2
  14. package/dist/dataParser/base.mjs +1 -0
  15. package/dist/dataParser/baseExtended.cjs +1 -0
  16. package/dist/dataParser/baseExtended.d.ts +1 -1
  17. package/dist/dataParser/baseExtended.mjs +1 -0
  18. package/dist/dataParser/error.d.ts +3 -3
  19. package/dist/dataParser/extended/array.cjs +1 -0
  20. package/dist/dataParser/extended/array.mjs +1 -0
  21. package/dist/dataParser/extended/bigint.cjs +1 -0
  22. package/dist/dataParser/extended/bigint.mjs +1 -0
  23. package/dist/dataParser/extended/boolean.cjs +1 -0
  24. package/dist/dataParser/extended/boolean.mjs +1 -0
  25. package/dist/dataParser/extended/coerce/bigint.cjs +1 -0
  26. package/dist/dataParser/extended/coerce/bigint.mjs +1 -0
  27. package/dist/dataParser/extended/coerce/boolean.cjs +1 -0
  28. package/dist/dataParser/extended/coerce/boolean.mjs +1 -0
  29. package/dist/dataParser/extended/coerce/empty.cjs +1 -0
  30. package/dist/dataParser/extended/coerce/empty.mjs +1 -0
  31. package/dist/dataParser/extended/coerce/nil.cjs +1 -0
  32. package/dist/dataParser/extended/coerce/nil.mjs +1 -0
  33. package/dist/dataParser/extended/coerce/number.cjs +1 -0
  34. package/dist/dataParser/extended/coerce/number.mjs +1 -0
  35. package/dist/dataParser/extended/coerce/string.cjs +1 -0
  36. package/dist/dataParser/extended/coerce/string.mjs +1 -0
  37. package/dist/dataParser/extended/empty.cjs +1 -0
  38. package/dist/dataParser/extended/empty.mjs +1 -0
  39. package/dist/dataParser/extended/lazy.cjs +1 -0
  40. package/dist/dataParser/extended/lazy.mjs +1 -0
  41. package/dist/dataParser/extended/literal.cjs +1 -0
  42. package/dist/dataParser/extended/literal.mjs +1 -0
  43. package/dist/dataParser/extended/nil.cjs +1 -0
  44. package/dist/dataParser/extended/nil.mjs +1 -0
  45. package/dist/dataParser/extended/nullable.cjs +1 -0
  46. package/dist/dataParser/extended/nullable.mjs +1 -0
  47. package/dist/dataParser/extended/number.cjs +1 -0
  48. package/dist/dataParser/extended/number.mjs +1 -0
  49. package/dist/dataParser/extended/object.cjs +1 -0
  50. package/dist/dataParser/extended/object.mjs +1 -0
  51. package/dist/dataParser/extended/optional.cjs +1 -0
  52. package/dist/dataParser/extended/optional.mjs +1 -0
  53. package/dist/dataParser/extended/pipe.cjs +1 -0
  54. package/dist/dataParser/extended/pipe.mjs +1 -0
  55. package/dist/dataParser/extended/record.cjs +1 -0
  56. package/dist/dataParser/extended/record.mjs +1 -0
  57. package/dist/dataParser/extended/string.cjs +1 -0
  58. package/dist/dataParser/extended/string.mjs +1 -0
  59. package/dist/dataParser/extended/templateLiteral.cjs +1 -0
  60. package/dist/dataParser/extended/templateLiteral.mjs +1 -0
  61. package/dist/dataParser/extended/transform.cjs +1 -0
  62. package/dist/dataParser/extended/transform.mjs +1 -0
  63. package/dist/dataParser/extended/tuple.cjs +1 -0
  64. package/dist/dataParser/extended/tuple.mjs +1 -0
  65. package/dist/dataParser/extended/union.cjs +1 -0
  66. package/dist/dataParser/extended/union.mjs +1 -0
  67. package/dist/dataParser/extended/unknown.cjs +1 -0
  68. package/dist/dataParser/extended/unknown.mjs +1 -0
  69. package/dist/dataParser/kind.cjs +2 -1
  70. package/dist/dataParser/kind.d.ts +1 -1
  71. package/dist/dataParser/kind.mjs +2 -1
  72. package/dist/dataParser/parsers/array/checkers/max.d.ts +1 -1
  73. package/dist/dataParser/parsers/array/checkers/min.d.ts +1 -1
  74. package/dist/dataParser/parsers/array/index.d.ts +1 -1
  75. package/dist/dataParser/parsers/bigint/checkers/max.d.ts +1 -1
  76. package/dist/dataParser/parsers/bigint/checkers/min.d.ts +1 -1
  77. package/dist/dataParser/parsers/bigint/index.d.ts +1 -1
  78. package/dist/dataParser/parsers/boolean.d.ts +1 -1
  79. package/dist/dataParser/parsers/coerce/bigint.cjs +1 -0
  80. package/dist/dataParser/parsers/coerce/bigint.mjs +1 -0
  81. package/dist/dataParser/parsers/coerce/boolean.cjs +1 -0
  82. package/dist/dataParser/parsers/coerce/boolean.mjs +1 -0
  83. package/dist/dataParser/parsers/coerce/empty.cjs +1 -0
  84. package/dist/dataParser/parsers/coerce/empty.mjs +1 -0
  85. package/dist/dataParser/parsers/coerce/nil.cjs +1 -0
  86. package/dist/dataParser/parsers/coerce/nil.mjs +1 -0
  87. package/dist/dataParser/parsers/coerce/number.cjs +1 -0
  88. package/dist/dataParser/parsers/coerce/number.mjs +1 -0
  89. package/dist/dataParser/parsers/coerce/string.cjs +1 -0
  90. package/dist/dataParser/parsers/coerce/string.mjs +1 -0
  91. package/dist/dataParser/parsers/empty.d.ts +1 -1
  92. package/dist/dataParser/parsers/lazy.d.ts +1 -1
  93. package/dist/dataParser/parsers/literal.cjs +1 -0
  94. package/dist/dataParser/parsers/literal.d.ts +1 -1
  95. package/dist/dataParser/parsers/literal.mjs +1 -0
  96. package/dist/dataParser/parsers/nil.d.ts +1 -1
  97. package/dist/dataParser/parsers/nullable.d.ts +1 -1
  98. package/dist/dataParser/parsers/number/checkers/int.d.ts +1 -1
  99. package/dist/dataParser/parsers/number/checkers/max.d.ts +1 -1
  100. package/dist/dataParser/parsers/number/checkers/min.d.ts +1 -1
  101. package/dist/dataParser/parsers/number/index.d.ts +1 -1
  102. package/dist/dataParser/parsers/object.cjs +1 -0
  103. package/dist/dataParser/parsers/object.d.ts +1 -1
  104. package/dist/dataParser/parsers/object.mjs +1 -0
  105. package/dist/dataParser/parsers/optional.d.ts +1 -1
  106. package/dist/dataParser/parsers/pipe.d.ts +1 -1
  107. package/dist/dataParser/parsers/record.d.ts +1 -1
  108. package/dist/dataParser/parsers/string/checkers/email.d.ts +1 -1
  109. package/dist/dataParser/parsers/string/checkers/max.d.ts +1 -1
  110. package/dist/dataParser/parsers/string/checkers/min.d.ts +1 -1
  111. package/dist/dataParser/parsers/string/checkers/regex.d.ts +1 -1
  112. package/dist/dataParser/parsers/string/checkers/url.d.ts +1 -1
  113. package/dist/dataParser/parsers/string/index.d.ts +1 -1
  114. package/dist/dataParser/parsers/templateLiteral.cjs +1 -0
  115. package/dist/dataParser/parsers/templateLiteral.d.ts +1 -1
  116. package/dist/dataParser/parsers/templateLiteral.mjs +1 -0
  117. package/dist/dataParser/parsers/transform.d.ts +1 -1
  118. package/dist/dataParser/parsers/tuple.d.ts +1 -1
  119. package/dist/dataParser/parsers/union.d.ts +1 -1
  120. package/dist/dataParser/parsers/unknown.d.ts +1 -1
  121. package/dist/either/bool/base.d.ts +1 -1
  122. package/dist/either/bool/falsy.cjs +1 -0
  123. package/dist/either/bool/falsy.d.ts +1 -1
  124. package/dist/either/bool/falsy.mjs +1 -0
  125. package/dist/either/bool/truthy.cjs +1 -0
  126. package/dist/either/bool/truthy.d.ts +1 -1
  127. package/dist/either/bool/truthy.mjs +1 -0
  128. package/dist/either/future/base.d.ts +1 -1
  129. package/dist/either/future/create.cjs +1 -0
  130. package/dist/either/future/create.mjs +1 -0
  131. package/dist/either/future/error.cjs +1 -0
  132. package/dist/either/future/error.d.ts +1 -1
  133. package/dist/either/future/error.mjs +1 -0
  134. package/dist/either/future/success.cjs +1 -0
  135. package/dist/either/future/success.d.ts +1 -1
  136. package/dist/either/future/success.mjs +1 -0
  137. package/dist/either/kind.cjs +2 -1
  138. package/dist/either/kind.d.ts +2 -2
  139. package/dist/either/kind.mjs +2 -1
  140. package/dist/either/left/create.d.ts +1 -1
  141. package/dist/either/left/error.d.ts +1 -1
  142. package/dist/either/left/fail.d.ts +1 -1
  143. package/dist/either/left/when.cjs +1 -0
  144. package/dist/either/left/when.mjs +1 -0
  145. package/dist/either/nullable/base.d.ts +1 -1
  146. package/dist/either/nullable/empty.cjs +1 -0
  147. package/dist/either/nullable/empty.d.ts +1 -1
  148. package/dist/either/nullable/empty.mjs +1 -0
  149. package/dist/either/nullable/filled.cjs +1 -0
  150. package/dist/either/nullable/filled.d.ts +1 -1
  151. package/dist/either/nullable/filled.mjs +1 -0
  152. package/dist/either/nullish/base.d.ts +1 -1
  153. package/dist/either/nullish/empty.cjs +1 -0
  154. package/dist/either/nullish/empty.d.ts +1 -1
  155. package/dist/either/nullish/empty.mjs +1 -0
  156. package/dist/either/nullish/filled.cjs +1 -0
  157. package/dist/either/nullish/filled.d.ts +1 -1
  158. package/dist/either/nullish/filled.mjs +1 -0
  159. package/dist/either/optional/base.d.ts +1 -1
  160. package/dist/either/optional/empty.cjs +1 -0
  161. package/dist/either/optional/empty.d.ts +1 -1
  162. package/dist/either/optional/empty.mjs +1 -0
  163. package/dist/either/optional/filled.cjs +1 -0
  164. package/dist/either/optional/filled.d.ts +1 -1
  165. package/dist/either/optional/filled.mjs +1 -0
  166. package/dist/either/right/asyncPipe.cjs +1 -0
  167. package/dist/either/right/asyncPipe.mjs +1 -0
  168. package/dist/either/right/create.d.ts +1 -1
  169. package/dist/either/right/ok.d.ts +1 -1
  170. package/dist/either/right/pipe.cjs +1 -0
  171. package/dist/either/right/pipe.mjs +1 -0
  172. package/dist/either/right/success.d.ts +1 -1
  173. package/dist/either/right/when.cjs +1 -0
  174. package/dist/either/right/when.mjs +1 -0
  175. package/dist/either/whenHasInformation.cjs +1 -0
  176. package/dist/either/whenHasInformation.mjs +1 -0
  177. package/dist/generator/asyncReduce.cjs +1 -0
  178. package/dist/generator/asyncReduce.mjs +1 -0
  179. package/dist/generator/reduce.cjs +1 -0
  180. package/dist/generator/reduce.mjs +1 -0
  181. package/dist/index.cjs +4 -0
  182. package/dist/index.mjs +1 -0
  183. package/dist/object/deepDiscriminate.cjs +1 -0
  184. package/dist/object/deepDiscriminate.mjs +1 -0
  185. package/dist/object/discriminate.cjs +1 -0
  186. package/dist/object/discriminate.mjs +1 -0
  187. package/dist/object/entries.cjs +1 -0
  188. package/dist/object/entries.mjs +1 -0
  189. package/dist/object/keys.cjs +1 -0
  190. package/dist/object/keys.mjs +1 -0
  191. package/dist/pattern/exhaustive.cjs +1 -0
  192. package/dist/pattern/exhaustive.mjs +1 -0
  193. package/dist/pattern/otherwise.cjs +1 -0
  194. package/dist/pattern/otherwise.mjs +1 -0
  195. package/dist/pattern/result.cjs +1 -0
  196. package/dist/pattern/result.mjs +1 -0
  197. package/dist/string/types/forbiddenString.d.ts +0 -1
  198. package/package.json +1 -1
@@ -4,6 +4,7 @@ var kind = require('../common/kind.cjs');
4
4
  var wrapValue = require('../common/wrapValue.cjs');
5
5
  var unwrap = require('../common/unwrap.cjs');
6
6
  require('../common/globalStore.cjs');
7
+ require('../common/builder.cjs');
7
8
  var override = require('../object/override.cjs');
8
9
 
9
10
  const arrayReduceFromKind = kind.createKind("array-reduce-from");
@@ -2,6 +2,7 @@ import { createKind } from '../common/kind.mjs';
2
2
  import { wrapValue } from '../common/wrapValue.mjs';
3
3
  import { unwrap } from '../common/unwrap.mjs';
4
4
  import '../common/globalStore.mjs';
5
+ import '../common/builder.mjs';
5
6
  import { override } from '../object/override.mjs';
6
7
 
7
8
  const arrayReduceFromKind = createKind("array-reduce-from");
@@ -2,6 +2,7 @@
2
2
 
3
3
  var unwrap = require('../common/unwrap.cjs');
4
4
  require('../common/globalStore.cjs');
5
+ require('../common/builder.cjs');
5
6
  var override = require('../object/override.cjs');
6
7
 
7
8
  function reduceRight(...args) {
@@ -1,5 +1,6 @@
1
1
  import { unwrap } from '../common/unwrap.mjs';
2
2
  import '../common/globalStore.mjs';
3
+ import '../common/builder.mjs';
3
4
  import { override } from '../object/override.mjs';
4
5
 
5
6
  function reduceRight(...args) {
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+
3
+ var globalStore = require('./globalStore.cjs');
4
+ var kind$1 = require('./kind.cjs');
5
+ var wrapValue = require('./wrapValue.cjs');
6
+ var unwrap = require('./unwrap.cjs');
7
+
8
+ const SymbolBuilderStore = Symbol.for("@duplojs/utils/builder");
9
+ const builderStore = globalStore.createGlobalStore(SymbolBuilderStore, {});
10
+ const createBuilderKind = kind$1.createKindNamespace(
11
+ // @ts-expect-error reserved kind
12
+ "DuplojsUtilsBuilder");
13
+ const builderKind = createBuilderKind("base");
14
+ const builderNextKind = createBuilderKind("next");
15
+ const kind = "kind-missing-builder-methods-error";
16
+ class MissingBuilderMethodsError extends Error {
17
+ method;
18
+ constructor(method) {
19
+ super(`Missing builder method: ${method}`);
20
+ this.method = method;
21
+ }
22
+ [kind] = null;
23
+ static instanceof(value) {
24
+ return typeof value === "object"
25
+ && value?.constructor?.name === "MissingBuilderMethodsError"
26
+ && kind in value;
27
+ }
28
+ }
29
+ function createBuilder(builderName) {
30
+ const store = builderStore.value[builderName] ?? {};
31
+ builderStore.set({
32
+ ...builderStore.value,
33
+ [builderName]: store,
34
+ });
35
+ const builderHandler = {
36
+ set(method, theFunction) {
37
+ store[method] = theFunction;
38
+ return builderHandler;
39
+ },
40
+ use(accumulator) {
41
+ return new Proxy(builderKind.addTo(store, accumulator), {
42
+ get(target, prop) {
43
+ if (prop === builderKind.runTimeKey) {
44
+ return target[prop];
45
+ }
46
+ if (!target[prop]) {
47
+ throw new MissingBuilderMethodsError(prop);
48
+ }
49
+ const theFunction = target[prop];
50
+ return (...args) => {
51
+ const result = theFunction({
52
+ args,
53
+ accumulator,
54
+ next: (newAccumulator) => builderNextKind.addTo(wrapValue.wrapValue(newAccumulator)),
55
+ });
56
+ if (builderNextKind.has(result)) {
57
+ return builderHandler.use(unwrap.unwrap(result));
58
+ }
59
+ return result;
60
+ };
61
+ },
62
+ });
63
+ },
64
+ };
65
+ return builderHandler;
66
+ }
67
+
68
+ exports.MissingBuilderMethodsError = MissingBuilderMethodsError;
69
+ exports.builderKind = builderKind;
70
+ exports.createBuilder = createBuilder;
@@ -0,0 +1,34 @@
1
+ import { type GetPropsWithValueExtends } from "../object";
2
+ import { type Adaptor, type AnyFunction } from "./types";
3
+ import { type Kind, type GetKindValue } from "./kind";
4
+ import { type WrappedValue } from "./wrapValue";
5
+ declare const SymbolBuilderStore: unique symbol;
6
+ declare module "./globalStore" {
7
+ interface GlobalStore {
8
+ [SymbolBuilderStore]: Record<string, Record<string, Parameters<BuilderHandler["set"]>[1]>>;
9
+ }
10
+ }
11
+ export declare const builderKind: import("./kind").KindHandler<import("./kind").KindDefinition<"@DuplojsUtilsBuilder/base", object>>;
12
+ export interface Builder<GenericAccumulator extends object = object> extends Kind<typeof builderKind.definition, GenericAccumulator> {
13
+ }
14
+ declare const builderNextKind: import("./kind").KindHandler<import("./kind").KindDefinition<"@DuplojsUtilsBuilder/next", unknown>>;
15
+ interface BuilderNext<GenericValue extends object = object> extends WrappedValue<GenericValue>, Kind<typeof builderNextKind.definition> {
16
+ }
17
+ export interface BuilderHandlerSetFunctionParams<GenericArgs extends unknown[], GenericValue extends object> {
18
+ args: GenericArgs;
19
+ accumulator: GenericValue;
20
+ next(newAccumulator: GenericValue): BuilderNext<GenericValue>;
21
+ }
22
+ export interface BuilderHandler<GenericBuilder extends Builder = Builder> {
23
+ set<GenericMethodName extends GetPropsWithValueExtends<GenericBuilder, AnyFunction>, GenericMethod extends Adaptor<GenericBuilder[GenericMethodName], AnyFunction>>(method: GenericMethodName, theFunction: (params: BuilderHandlerSetFunctionParams<Parameters<GenericMethod>, GetKindValue<typeof builderKind, GenericBuilder>>) => ReturnType<GenericMethod> extends GenericBuilder ? BuilderNext<GetKindValue<typeof builderKind, GenericBuilder>> : ReturnType<GenericMethod>): BuilderHandler<GenericBuilder>;
24
+ use<GenericCurrentBuilder extends GenericBuilder>(accumulator: GetKindValue<typeof builderKind, GenericBuilder>): GenericCurrentBuilder;
25
+ }
26
+ declare const kind = "kind-missing-builder-methods-error";
27
+ export declare class MissingBuilderMethodsError extends Error {
28
+ method: string;
29
+ constructor(method: string);
30
+ [kind]: unknown;
31
+ static instanceof(value: unknown): value is MissingBuilderMethodsError;
32
+ }
33
+ export declare function createBuilder<GenericBuilder extends Builder>(builderName: string): BuilderHandler<GenericBuilder>;
34
+ export {};
@@ -0,0 +1,66 @@
1
+ import { createGlobalStore } from './globalStore.mjs';
2
+ import { createKindNamespace } from './kind.mjs';
3
+ import { wrapValue } from './wrapValue.mjs';
4
+ import { unwrap } from './unwrap.mjs';
5
+
6
+ const SymbolBuilderStore = Symbol.for("@duplojs/utils/builder");
7
+ const builderStore = createGlobalStore(SymbolBuilderStore, {});
8
+ const createBuilderKind = createKindNamespace(
9
+ // @ts-expect-error reserved kind
10
+ "DuplojsUtilsBuilder");
11
+ const builderKind = createBuilderKind("base");
12
+ const builderNextKind = createBuilderKind("next");
13
+ const kind = "kind-missing-builder-methods-error";
14
+ class MissingBuilderMethodsError extends Error {
15
+ method;
16
+ constructor(method) {
17
+ super(`Missing builder method: ${method}`);
18
+ this.method = method;
19
+ }
20
+ [kind] = null;
21
+ static instanceof(value) {
22
+ return typeof value === "object"
23
+ && value?.constructor?.name === "MissingBuilderMethodsError"
24
+ && kind in value;
25
+ }
26
+ }
27
+ function createBuilder(builderName) {
28
+ const store = builderStore.value[builderName] ?? {};
29
+ builderStore.set({
30
+ ...builderStore.value,
31
+ [builderName]: store,
32
+ });
33
+ const builderHandler = {
34
+ set(method, theFunction) {
35
+ store[method] = theFunction;
36
+ return builderHandler;
37
+ },
38
+ use(accumulator) {
39
+ return new Proxy(builderKind.addTo(store, accumulator), {
40
+ get(target, prop) {
41
+ if (prop === builderKind.runTimeKey) {
42
+ return target[prop];
43
+ }
44
+ if (!target[prop]) {
45
+ throw new MissingBuilderMethodsError(prop);
46
+ }
47
+ const theFunction = target[prop];
48
+ return (...args) => {
49
+ const result = theFunction({
50
+ args,
51
+ accumulator,
52
+ next: (newAccumulator) => builderNextKind.addTo(wrapValue(newAccumulator)),
53
+ });
54
+ if (builderNextKind.has(result)) {
55
+ return builderHandler.use(unwrap(result));
56
+ }
57
+ return result;
58
+ };
59
+ },
60
+ });
61
+ },
62
+ };
63
+ return builderHandler;
64
+ }
65
+
66
+ export { MissingBuilderMethodsError, builderKind, createBuilder };
@@ -37,3 +37,4 @@ export * from "./justReturn";
37
37
  export * from "./memo";
38
38
  export * from "./instanceOf";
39
39
  export * from "./globalStore";
40
+ export * from "./builder";
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  require('./globalStore.cjs');
4
+ require('./builder.cjs');
4
5
  var coalescing = require('../array/coalescing.cjs');
5
6
 
6
7
  function instanceOf(...args) {
@@ -1,4 +1,5 @@
1
1
  import './globalStore.mjs';
2
+ import './builder.mjs';
2
3
  import { coalescing } from '../array/coalescing.mjs';
3
4
 
4
5
  function instanceOf(...args) {
@@ -40,8 +40,9 @@ export declare const keyKindPrefix = "@duplojs/utils/kind/";
40
40
  type ForbiddenKindCharacters<GenericValue extends string> = ForbiddenString<GenericValue, "@" | "/">;
41
41
  export declare function createKind<GenericName extends string, GenericKindValue extends unknown = unknown>(name: GenericName & ForbiddenKindCharacters<GenericName>): KindHandler<KindDefinition<GenericName, GenericKindValue>>;
42
42
  export interface ReservedKindNamespace {
43
- Either: true;
44
- DataParser: true;
43
+ DuplojsUtilsEither: true;
44
+ DuplojsUtilsDataParser: true;
45
+ DuplojsUtilsBuilder: true;
45
46
  }
46
47
  type ForbiddenKindNamespace<GenericValue extends string> = (ForbiddenKindCharacters<GenericValue> & ForbiddenString<GenericValue, GetPropsWithValue<ReservedKindNamespace, true>>);
47
48
  export declare function createKindNamespace<GenericNamespace extends string>(namespace: GenericNamespace & ForbiddenKindNamespace<GenericNamespace>): <GenericName extends string, GenericKindValue extends unknown = unknown>(name: GenericName & ForbiddenKindCharacters<GenericName>) => KindHandler<KindDefinition<`@${GenericNamespace}/${GenericName}`, GenericKindValue>>;
@@ -2,6 +2,7 @@
2
2
 
3
3
  var simpleClone = require('../common/simpleClone.cjs');
4
4
  require('../common/globalStore.cjs');
5
+ require('../common/builder.cjs');
5
6
  var error = require('./error.cjs');
6
7
  var error$1 = require('../either/left/error.cjs');
7
8
  var success = require('../either/right/success.cjs');
@@ -4,7 +4,7 @@ import * as DEither from "../either";
4
4
  export declare const SymbolDataParserErrorLabel = "SymbolDataParserError";
5
5
  export declare const SymbolDataParserError: unique symbol;
6
6
  export type SymbolDataParserError = typeof SymbolDataParserError;
7
- export declare const dataParserCheckerKind: KindHandler<import("../common").KindDefinition<"@DataParser/checker", unknown>>;
7
+ export declare const dataParserCheckerKind: KindHandler<import("../common").KindDefinition<"@DuplojsUtilsDataParser/checker", unknown>>;
8
8
  export interface DataParserCheckerDefinition {
9
9
  readonly errorMessage?: string;
10
10
  }
@@ -13,7 +13,7 @@ export interface DataParserChecker<GenericDefinition extends DataParserCheckerDe
13
13
  exec(data: GenericInput, self: this): GenericInput | SymbolDataParserErrorIssue;
14
14
  }
15
15
  export declare function dataParserCheckerInit<GenericDataParserChecker extends DataParserChecker>(kind: Exclude<GetKindHandler<GenericDataParserChecker>, typeof dataParserCheckerKind>, params: NoInfer<Omit<RemoveKind<GenericDataParserChecker>, "exec">>, exec: (...args: Parameters<GenericDataParserChecker["exec"]>) => GetKindValue<typeof dataParserCheckerKind, GenericDataParserChecker> | SymbolDataParserErrorIssue): GenericDataParserChecker;
16
- export declare const dataParserKind: KindHandler<import("../common").KindDefinition<"@DataParser/base", {
16
+ export declare const dataParserKind: KindHandler<import("../common").KindDefinition<"@DuplojsUtilsDataParser/base", {
17
17
  input: unknown;
18
18
  output: unknown;
19
19
  }>>;
@@ -1,5 +1,6 @@
1
1
  import { simpleClone } from '../common/simpleClone.mjs';
2
2
  import '../common/globalStore.mjs';
3
+ import '../common/builder.mjs';
3
4
  import { createError, SymbolDataParserErrorIssue, addIssue, SymbolDataParserErrorPromiseIssue, addPromiseIssue } from './error.mjs';
4
5
  import { error } from '../either/left/error.mjs';
5
6
  import { success } from '../either/right/success.mjs';
@@ -6,6 +6,7 @@ var fromEntries = require('../object/fromEntries.cjs');
6
6
  var entry = require('../object/entry.cjs');
7
7
  var map = require('../array/map.cjs');
8
8
  require('../common/globalStore.cjs');
9
+ require('../common/builder.cjs');
9
10
  var kind = require('./kind.cjs');
10
11
  require('../pattern/result.cjs');
11
12
  var array = require('./extended/array.cjs');
@@ -4,7 +4,7 @@ import { type Output, type DataParser } from "./base";
4
4
  import type * as dataParsers from "./parsers";
5
5
  import * as dataParsersExtended from "./extended";
6
6
  import { type DataParserError } from "./error";
7
- export declare const dataParserExtendedKind: import("../common").KindHandler<import("../common").KindDefinition<"@DataParser/extended", unknown>>;
7
+ export declare const dataParserExtendedKind: import("../common").KindHandler<import("../common").KindDefinition<"@DuplojsUtilsDataParser/extended", unknown>>;
8
8
  type _DataParserExtended = (DataParser & Kind<typeof dataParserExtendedKind.definition>);
9
9
  export interface DataParserExtended extends _DataParserExtended {
10
10
  array<GenericThis extends this = this, const GenericDefinition extends Partial<Omit<dataParsers.DataParserDefinitionArray, "element">> = never>(definition?: GenericDefinition): dataParsersExtended.DataParserArrayExtended<MergeDefinition<dataParsers.DataParserDefinitionArray, NeverCoalescing<GenericDefinition, {}> & {
@@ -4,6 +4,7 @@ import { fromEntries } from '../object/fromEntries.mjs';
4
4
  import { entry } from '../object/entry.mjs';
5
5
  import { map } from '../array/map.mjs';
6
6
  import '../common/globalStore.mjs';
7
+ import '../common/builder.mjs';
7
8
  import { createDataParserKind } from './kind.mjs';
8
9
  import '../pattern/result.mjs';
9
10
  import { array } from './extended/array.mjs';
@@ -4,7 +4,7 @@ import { type DataParserTransform } from "./parsers";
4
4
  export declare const SymbolDataParserErrorIssueLabel = "SymbolDataParserErrorIssue";
5
5
  export declare const SymbolDataParserErrorIssue: unique symbol;
6
6
  export type SymbolDataParserErrorIssue = typeof SymbolDataParserErrorIssue;
7
- export declare const dataParserErrorIssueKind: import("../common").KindHandler<import("../common").KindDefinition<"@DataParser/error-issue", unknown>>;
7
+ export declare const dataParserErrorIssueKind: import("../common").KindHandler<import("../common").KindDefinition<"@DuplojsUtilsDataParser/error-issue", unknown>>;
8
8
  export interface DataParserErrorIssue extends Kind<typeof dataParserErrorIssueKind.definition> {
9
9
  readonly source: DataParsers | Checkers;
10
10
  readonly path: string;
@@ -13,13 +13,13 @@ export interface DataParserErrorIssue extends Kind<typeof dataParserErrorIssueKi
13
13
  export declare const SymbolDataParserErrorPromiseIssueLabel = "SymbolDataParserErrorPromiseIssue";
14
14
  export declare const SymbolDataParserErrorPromiseIssue: unique symbol;
15
15
  export type SymbolDataParserErrorPromiseIssue = typeof SymbolDataParserErrorPromiseIssue;
16
- export declare const dataParserErrorPromiseIssueKind: import("../common").KindHandler<import("../common").KindDefinition<"@DataParser/error-issue-promise", unknown>>;
16
+ export declare const dataParserErrorPromiseIssueKind: import("../common").KindHandler<import("../common").KindDefinition<"@DuplojsUtilsDataParser/error-issue-promise", unknown>>;
17
17
  export interface DataParserErrorPromiseIssue extends Kind<typeof dataParserErrorPromiseIssueKind.definition> {
18
18
  readonly source: DataParserTransform;
19
19
  readonly path: string;
20
20
  readonly data: unknown;
21
21
  }
22
- export declare const dataParserErrorKind: import("../common").KindHandler<import("../common").KindDefinition<"@DataParser/error", unknown>>;
22
+ export declare const dataParserErrorKind: import("../common").KindHandler<import("../common").KindDefinition<"@DuplojsUtilsDataParser/error", unknown>>;
23
23
  export interface DataParserError extends Kind<typeof dataParserErrorKind.definition> {
24
24
  readonly issues: (DataParserErrorIssue | DataParserErrorPromiseIssue)[];
25
25
  readonly currentPath: string[];
@@ -2,6 +2,7 @@
2
2
 
3
3
  var baseExtended = require('../baseExtended.cjs');
4
4
  require('../../common/globalStore.cjs');
5
+ require('../../common/builder.cjs');
5
6
  var index = require('../parsers/array/index.cjs');
6
7
  require('../../pattern/result.cjs');
7
8
  var max = require('../parsers/array/checkers/max.cjs');
@@ -1,5 +1,6 @@
1
1
  import { dataParserExtendedInit } from '../baseExtended.mjs';
2
2
  import '../../common/globalStore.mjs';
3
+ import '../../common/builder.mjs';
3
4
  import { array as array$1 } from '../parsers/array/index.mjs';
4
5
  import '../../pattern/result.mjs';
5
6
  import { checkerArrayMax } from '../parsers/array/checkers/max.mjs';
@@ -2,6 +2,7 @@
2
2
 
3
3
  var baseExtended = require('../baseExtended.cjs');
4
4
  require('../../common/globalStore.cjs');
5
+ require('../../common/builder.cjs');
5
6
  var index = require('../parsers/bigint/index.cjs');
6
7
  require('../../pattern/result.cjs');
7
8
  var max = require('../parsers/bigint/checkers/max.cjs');
@@ -1,5 +1,6 @@
1
1
  import { dataParserExtendedInit } from '../baseExtended.mjs';
2
2
  import '../../common/globalStore.mjs';
3
+ import '../../common/builder.mjs';
3
4
  import { bigint as bigint$1 } from '../parsers/bigint/index.mjs';
4
5
  import '../../pattern/result.mjs';
5
6
  import { checkerBigIntMax } from '../parsers/bigint/checkers/max.mjs';
@@ -2,6 +2,7 @@
2
2
 
3
3
  var baseExtended = require('../baseExtended.cjs');
4
4
  require('../../common/globalStore.cjs');
5
+ require('../../common/builder.cjs');
5
6
  var boolean$1 = require('../parsers/boolean.cjs');
6
7
  require('../../pattern/result.cjs');
7
8
 
@@ -1,5 +1,6 @@
1
1
  import { dataParserExtendedInit } from '../baseExtended.mjs';
2
2
  import '../../common/globalStore.mjs';
3
+ import '../../common/builder.mjs';
3
4
  import { boolean as boolean$1 } from '../parsers/boolean.mjs';
4
5
  import '../../pattern/result.mjs';
5
6
 
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  require('../../../common/globalStore.cjs');
4
+ require('../../../common/builder.cjs');
4
5
  require('../../../pattern/result.cjs');
5
6
  var bigint$1 = require('../bigint.cjs');
6
7
 
@@ -1,4 +1,5 @@
1
1
  import '../../../common/globalStore.mjs';
2
+ import '../../../common/builder.mjs';
2
3
  import '../../../pattern/result.mjs';
3
4
  import { bigint as bigint$1 } from '../bigint.mjs';
4
5
 
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  require('../../../common/globalStore.cjs');
4
+ require('../../../common/builder.cjs');
4
5
  require('../../../pattern/result.cjs');
5
6
  var boolean$1 = require('../boolean.cjs');
6
7
 
@@ -1,4 +1,5 @@
1
1
  import '../../../common/globalStore.mjs';
2
+ import '../../../common/builder.mjs';
2
3
  import '../../../pattern/result.mjs';
3
4
  import { boolean as boolean$1 } from '../boolean.mjs';
4
5
 
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  require('../../../common/globalStore.cjs');
4
+ require('../../../common/builder.cjs');
4
5
  require('../../../pattern/result.cjs');
5
6
  var empty$1 = require('../empty.cjs');
6
7
 
@@ -1,4 +1,5 @@
1
1
  import '../../../common/globalStore.mjs';
2
+ import '../../../common/builder.mjs';
2
3
  import '../../../pattern/result.mjs';
3
4
  import { empty as empty$1 } from '../empty.mjs';
4
5
 
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  require('../../../common/globalStore.cjs');
4
+ require('../../../common/builder.cjs');
4
5
  require('../../../pattern/result.cjs');
5
6
  var nil$1 = require('../nil.cjs');
6
7
 
@@ -1,4 +1,5 @@
1
1
  import '../../../common/globalStore.mjs';
2
+ import '../../../common/builder.mjs';
2
3
  import '../../../pattern/result.mjs';
3
4
  import { nil as nil$1 } from '../nil.mjs';
4
5
 
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  require('../../../common/globalStore.cjs');
4
+ require('../../../common/builder.cjs');
4
5
  require('../../../pattern/result.cjs');
5
6
  var number$1 = require('../number.cjs');
6
7
 
@@ -1,4 +1,5 @@
1
1
  import '../../../common/globalStore.mjs';
2
+ import '../../../common/builder.mjs';
2
3
  import '../../../pattern/result.mjs';
3
4
  import { number as number$1 } from '../number.mjs';
4
5
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  var string$1 = require('../string.cjs');
4
4
  require('../../../common/globalStore.cjs');
5
+ require('../../../common/builder.cjs');
5
6
  require('../../../pattern/result.cjs');
6
7
 
7
8
  function string(definition) {
@@ -1,5 +1,6 @@
1
1
  import { string as string$1 } from '../string.mjs';
2
2
  import '../../../common/globalStore.mjs';
3
+ import '../../../common/builder.mjs';
3
4
  import '../../../pattern/result.mjs';
4
5
 
5
6
  function string(definition) {
@@ -2,6 +2,7 @@
2
2
 
3
3
  var baseExtended = require('../baseExtended.cjs');
4
4
  require('../../common/globalStore.cjs');
5
+ require('../../common/builder.cjs');
5
6
  var empty$1 = require('../parsers/empty.cjs');
6
7
  require('../../pattern/result.cjs');
7
8
 
@@ -1,5 +1,6 @@
1
1
  import { dataParserExtendedInit } from '../baseExtended.mjs';
2
2
  import '../../common/globalStore.mjs';
3
+ import '../../common/builder.mjs';
3
4
  import { empty as empty$1 } from '../parsers/empty.mjs';
4
5
  import '../../pattern/result.mjs';
5
6
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  var baseExtended = require('../baseExtended.cjs');
4
4
  require('../../common/globalStore.cjs');
5
+ require('../../common/builder.cjs');
5
6
  require('../../pattern/result.cjs');
6
7
  var lazy$1 = require('../parsers/lazy.cjs');
7
8
 
@@ -1,5 +1,6 @@
1
1
  import { dataParserExtendedInit } from '../baseExtended.mjs';
2
2
  import '../../common/globalStore.mjs';
3
+ import '../../common/builder.mjs';
3
4
  import '../../pattern/result.mjs';
4
5
  import { lazy as lazy$1 } from '../parsers/lazy.mjs';
5
6
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  var baseExtended = require('../baseExtended.cjs');
4
4
  require('../../common/globalStore.cjs');
5
+ require('../../common/builder.cjs');
5
6
  var literal$1 = require('../parsers/literal.cjs');
6
7
  require('../../pattern/result.cjs');
7
8
 
@@ -1,5 +1,6 @@
1
1
  import { dataParserExtendedInit } from '../baseExtended.mjs';
2
2
  import '../../common/globalStore.mjs';
3
+ import '../../common/builder.mjs';
3
4
  import { literal as literal$1 } from '../parsers/literal.mjs';
4
5
  import '../../pattern/result.mjs';
5
6
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  var baseExtended = require('../baseExtended.cjs');
4
4
  require('../../common/globalStore.cjs');
5
+ require('../../common/builder.cjs');
5
6
  var nil$1 = require('../parsers/nil.cjs');
6
7
  require('../../pattern/result.cjs');
7
8
 
@@ -1,5 +1,6 @@
1
1
  import { dataParserExtendedInit } from '../baseExtended.mjs';
2
2
  import '../../common/globalStore.mjs';
3
+ import '../../common/builder.mjs';
3
4
  import { nil as nil$1 } from '../parsers/nil.mjs';
4
5
  import '../../pattern/result.mjs';
5
6
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  var baseExtended = require('../baseExtended.cjs');
4
4
  require('../../common/globalStore.cjs');
5
+ require('../../common/builder.cjs');
5
6
  require('../../pattern/result.cjs');
6
7
  var nullable$1 = require('../parsers/nullable.cjs');
7
8
 
@@ -1,5 +1,6 @@
1
1
  import { dataParserExtendedInit } from '../baseExtended.mjs';
2
2
  import '../../common/globalStore.mjs';
3
+ import '../../common/builder.mjs';
3
4
  import '../../pattern/result.mjs';
4
5
  import { nullable as nullable$1 } from '../parsers/nullable.mjs';
5
6
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  var baseExtended = require('../baseExtended.cjs');
4
4
  require('../../common/globalStore.cjs');
5
+ require('../../common/builder.cjs');
5
6
  var index = require('../parsers/number/index.cjs');
6
7
  require('../../pattern/result.cjs');
7
8
  var int$1 = require('../parsers/number/checkers/int.cjs');
@@ -1,5 +1,6 @@
1
1
  import { dataParserExtendedInit } from '../baseExtended.mjs';
2
2
  import '../../common/globalStore.mjs';
3
+ import '../../common/builder.mjs';
3
4
  import { number as number$1 } from '../parsers/number/index.mjs';
4
5
  import '../../pattern/result.mjs';
5
6
  import { checkerInt } from '../parsers/number/checkers/int.mjs';
@@ -2,6 +2,7 @@
2
2
 
3
3
  var baseExtended = require('../baseExtended.cjs');
4
4
  require('../../common/globalStore.cjs');
5
+ require('../../common/builder.cjs');
5
6
  var object$1 = require('../parsers/object.cjs');
6
7
  require('../../pattern/result.cjs');
7
8
 
@@ -1,5 +1,6 @@
1
1
  import { dataParserExtendedInit } from '../baseExtended.mjs';
2
2
  import '../../common/globalStore.mjs';
3
+ import '../../common/builder.mjs';
3
4
  import { object as object$1 } from '../parsers/object.mjs';
4
5
  import '../../pattern/result.mjs';
5
6
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  var baseExtended = require('../baseExtended.cjs');
4
4
  require('../../common/globalStore.cjs');
5
+ require('../../common/builder.cjs');
5
6
  require('../../pattern/result.cjs');
6
7
  var optional$1 = require('../parsers/optional.cjs');
7
8
 
@@ -1,5 +1,6 @@
1
1
  import { dataParserExtendedInit } from '../baseExtended.mjs';
2
2
  import '../../common/globalStore.mjs';
3
+ import '../../common/builder.mjs';
3
4
  import '../../pattern/result.mjs';
4
5
  import { optional as optional$1 } from '../parsers/optional.mjs';
5
6