@duplojs/utils 1.1.7 → 1.1.8

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 (210) hide show
  1. package/dist/common/kind.cjs +7 -0
  2. package/dist/common/kind.d.ts +4 -2
  3. package/dist/common/kind.mjs +7 -1
  4. package/dist/dataParser/base.cjs +3 -3
  5. package/dist/dataParser/base.d.ts +2 -2
  6. package/dist/dataParser/base.mjs +3 -3
  7. package/dist/dataParser/baseExtended.cjs +2 -2
  8. package/dist/dataParser/baseExtended.d.ts +1 -1
  9. package/dist/dataParser/baseExtended.mjs +2 -2
  10. package/dist/dataParser/error.cjs +4 -4
  11. package/dist/dataParser/error.d.ts +3 -3
  12. package/dist/dataParser/error.mjs +4 -4
  13. package/dist/dataParser/kind.cjs +7 -0
  14. package/dist/dataParser/kind.d.ts +1 -0
  15. package/dist/dataParser/kind.mjs +5 -0
  16. package/dist/dataParser/parsers/array/checkers/max.cjs +2 -2
  17. package/dist/dataParser/parsers/array/checkers/max.d.ts +1 -1
  18. package/dist/dataParser/parsers/array/checkers/max.mjs +2 -2
  19. package/dist/dataParser/parsers/array/checkers/min.cjs +2 -2
  20. package/dist/dataParser/parsers/array/checkers/min.d.ts +1 -1
  21. package/dist/dataParser/parsers/array/checkers/min.mjs +2 -2
  22. package/dist/dataParser/parsers/array/index.cjs +2 -2
  23. package/dist/dataParser/parsers/array/index.d.ts +1 -1
  24. package/dist/dataParser/parsers/array/index.mjs +2 -2
  25. package/dist/dataParser/parsers/bigint/checkers/max.cjs +2 -2
  26. package/dist/dataParser/parsers/bigint/checkers/max.d.ts +1 -1
  27. package/dist/dataParser/parsers/bigint/checkers/max.mjs +2 -2
  28. package/dist/dataParser/parsers/bigint/checkers/min.cjs +2 -2
  29. package/dist/dataParser/parsers/bigint/checkers/min.d.ts +1 -1
  30. package/dist/dataParser/parsers/bigint/checkers/min.mjs +2 -2
  31. package/dist/dataParser/parsers/bigint/index.cjs +2 -2
  32. package/dist/dataParser/parsers/bigint/index.d.ts +1 -1
  33. package/dist/dataParser/parsers/bigint/index.mjs +2 -2
  34. package/dist/dataParser/parsers/boolean.cjs +2 -2
  35. package/dist/dataParser/parsers/boolean.d.ts +1 -1
  36. package/dist/dataParser/parsers/boolean.mjs +2 -2
  37. package/dist/dataParser/parsers/empty.cjs +2 -2
  38. package/dist/dataParser/parsers/empty.d.ts +1 -1
  39. package/dist/dataParser/parsers/empty.mjs +2 -2
  40. package/dist/dataParser/parsers/lazy.cjs +2 -2
  41. package/dist/dataParser/parsers/lazy.d.ts +1 -1
  42. package/dist/dataParser/parsers/lazy.mjs +2 -2
  43. package/dist/dataParser/parsers/literal.cjs +3 -3
  44. package/dist/dataParser/parsers/literal.d.ts +1 -1
  45. package/dist/dataParser/parsers/literal.mjs +3 -3
  46. package/dist/dataParser/parsers/nil.cjs +2 -2
  47. package/dist/dataParser/parsers/nil.d.ts +1 -1
  48. package/dist/dataParser/parsers/nil.mjs +2 -2
  49. package/dist/dataParser/parsers/nullable.cjs +2 -2
  50. package/dist/dataParser/parsers/nullable.d.ts +1 -1
  51. package/dist/dataParser/parsers/nullable.mjs +2 -2
  52. package/dist/dataParser/parsers/number/checkers/int.cjs +2 -2
  53. package/dist/dataParser/parsers/number/checkers/int.d.ts +1 -1
  54. package/dist/dataParser/parsers/number/checkers/int.mjs +2 -2
  55. package/dist/dataParser/parsers/number/checkers/max.cjs +2 -2
  56. package/dist/dataParser/parsers/number/checkers/max.d.ts +1 -1
  57. package/dist/dataParser/parsers/number/checkers/max.mjs +2 -2
  58. package/dist/dataParser/parsers/number/checkers/min.cjs +2 -2
  59. package/dist/dataParser/parsers/number/checkers/min.d.ts +1 -1
  60. package/dist/dataParser/parsers/number/checkers/min.mjs +2 -2
  61. package/dist/dataParser/parsers/number/index.cjs +2 -2
  62. package/dist/dataParser/parsers/number/index.d.ts +1 -1
  63. package/dist/dataParser/parsers/number/index.mjs +2 -2
  64. package/dist/dataParser/parsers/object.cjs +2 -2
  65. package/dist/dataParser/parsers/object.d.ts +1 -1
  66. package/dist/dataParser/parsers/object.mjs +2 -2
  67. package/dist/dataParser/parsers/optional.cjs +2 -2
  68. package/dist/dataParser/parsers/optional.d.ts +1 -1
  69. package/dist/dataParser/parsers/optional.mjs +2 -2
  70. package/dist/dataParser/parsers/pipe.cjs +2 -2
  71. package/dist/dataParser/parsers/pipe.d.ts +1 -1
  72. package/dist/dataParser/parsers/pipe.mjs +2 -2
  73. package/dist/dataParser/parsers/record.cjs +2 -2
  74. package/dist/dataParser/parsers/record.d.ts +1 -1
  75. package/dist/dataParser/parsers/record.mjs +2 -2
  76. package/dist/dataParser/parsers/string/checkers/email.cjs +2 -2
  77. package/dist/dataParser/parsers/string/checkers/email.d.ts +1 -1
  78. package/dist/dataParser/parsers/string/checkers/email.mjs +2 -2
  79. package/dist/dataParser/parsers/string/checkers/max.cjs +2 -2
  80. package/dist/dataParser/parsers/string/checkers/max.d.ts +1 -1
  81. package/dist/dataParser/parsers/string/checkers/max.mjs +2 -2
  82. package/dist/dataParser/parsers/string/checkers/min.cjs +2 -2
  83. package/dist/dataParser/parsers/string/checkers/min.d.ts +1 -1
  84. package/dist/dataParser/parsers/string/checkers/min.mjs +2 -2
  85. package/dist/dataParser/parsers/string/checkers/regex.cjs +2 -2
  86. package/dist/dataParser/parsers/string/checkers/regex.d.ts +1 -1
  87. package/dist/dataParser/parsers/string/checkers/regex.mjs +2 -2
  88. package/dist/dataParser/parsers/string/checkers/url.cjs +2 -2
  89. package/dist/dataParser/parsers/string/checkers/url.d.ts +1 -1
  90. package/dist/dataParser/parsers/string/checkers/url.mjs +2 -2
  91. package/dist/dataParser/parsers/string/index.cjs +2 -2
  92. package/dist/dataParser/parsers/string/index.d.ts +1 -1
  93. package/dist/dataParser/parsers/string/index.mjs +2 -2
  94. package/dist/dataParser/parsers/templateLiteral.cjs +2 -2
  95. package/dist/dataParser/parsers/templateLiteral.d.ts +1 -1
  96. package/dist/dataParser/parsers/templateLiteral.mjs +2 -2
  97. package/dist/dataParser/parsers/transform.cjs +2 -2
  98. package/dist/dataParser/parsers/transform.d.ts +1 -1
  99. package/dist/dataParser/parsers/transform.mjs +2 -2
  100. package/dist/dataParser/parsers/tuple.cjs +2 -2
  101. package/dist/dataParser/parsers/tuple.d.ts +1 -1
  102. package/dist/dataParser/parsers/tuple.mjs +2 -2
  103. package/dist/dataParser/parsers/union.cjs +2 -2
  104. package/dist/dataParser/parsers/union.d.ts +1 -1
  105. package/dist/dataParser/parsers/union.mjs +2 -2
  106. package/dist/dataParser/parsers/unknown.cjs +2 -2
  107. package/dist/dataParser/parsers/unknown.d.ts +1 -1
  108. package/dist/dataParser/parsers/unknown.mjs +2 -2
  109. package/dist/either/bool/base.cjs +2 -2
  110. package/dist/either/bool/base.d.ts +1 -1
  111. package/dist/either/bool/base.mjs +2 -2
  112. package/dist/either/bool/falsy.cjs +4 -4
  113. package/dist/either/bool/falsy.d.ts +4 -4
  114. package/dist/either/bool/falsy.mjs +4 -4
  115. package/dist/either/bool/truthy.cjs +3 -3
  116. package/dist/either/bool/truthy.d.ts +5 -5
  117. package/dist/either/bool/truthy.mjs +3 -3
  118. package/dist/either/future/base.cjs +2 -2
  119. package/dist/either/future/base.d.ts +1 -1
  120. package/dist/either/future/base.mjs +2 -2
  121. package/dist/either/future/error.cjs +2 -2
  122. package/dist/either/future/error.d.ts +1 -1
  123. package/dist/either/future/error.mjs +2 -2
  124. package/dist/either/future/success.cjs +2 -2
  125. package/dist/either/future/success.d.ts +2 -2
  126. package/dist/either/future/success.mjs +2 -2
  127. package/dist/either/hasInformation.cjs +3 -3
  128. package/dist/either/hasInformation.d.ts +1 -1
  129. package/dist/either/hasInformation.mjs +1 -1
  130. package/dist/either/index.cjs +3 -2
  131. package/dist/either/index.d.ts +1 -1
  132. package/dist/either/index.mjs +1 -1
  133. package/dist/either/kind.cjs +9 -0
  134. package/dist/either/kind.d.ts +2 -0
  135. package/dist/either/kind.mjs +6 -0
  136. package/dist/either/left/create.cjs +3 -4
  137. package/dist/either/left/create.d.ts +2 -2
  138. package/dist/either/left/create.mjs +2 -3
  139. package/dist/either/left/error.cjs +2 -2
  140. package/dist/either/left/error.d.ts +1 -1
  141. package/dist/either/left/error.mjs +2 -2
  142. package/dist/either/left/fail.cjs +2 -2
  143. package/dist/either/left/fail.d.ts +1 -1
  144. package/dist/either/left/fail.mjs +2 -2
  145. package/dist/either/left/is.cjs +2 -2
  146. package/dist/either/left/is.mjs +1 -1
  147. package/dist/either/nullable/base.cjs +2 -2
  148. package/dist/either/nullable/base.d.ts +1 -1
  149. package/dist/either/nullable/base.mjs +2 -2
  150. package/dist/either/nullable/empty.cjs +2 -2
  151. package/dist/either/nullable/empty.d.ts +1 -1
  152. package/dist/either/nullable/empty.mjs +2 -2
  153. package/dist/either/nullable/filled.cjs +2 -2
  154. package/dist/either/nullable/filled.d.ts +1 -1
  155. package/dist/either/nullable/filled.mjs +2 -2
  156. package/dist/either/nullish/base.cjs +2 -2
  157. package/dist/either/nullish/base.d.ts +1 -1
  158. package/dist/either/nullish/base.mjs +2 -2
  159. package/dist/either/nullish/empty.cjs +2 -2
  160. package/dist/either/nullish/empty.d.ts +2 -2
  161. package/dist/either/nullish/empty.mjs +2 -2
  162. package/dist/either/nullish/filled.cjs +3 -3
  163. package/dist/either/nullish/filled.d.ts +1 -1
  164. package/dist/either/nullish/filled.mjs +3 -3
  165. package/dist/either/optional/base.cjs +2 -2
  166. package/dist/either/optional/base.d.ts +1 -1
  167. package/dist/either/optional/base.mjs +2 -2
  168. package/dist/either/optional/empty.cjs +4 -4
  169. package/dist/either/optional/empty.d.ts +3 -3
  170. package/dist/either/optional/empty.mjs +4 -4
  171. package/dist/either/optional/filled.cjs +4 -4
  172. package/dist/either/optional/filled.d.ts +3 -3
  173. package/dist/either/optional/filled.mjs +4 -4
  174. package/dist/either/right/create.cjs +3 -4
  175. package/dist/either/right/create.d.ts +2 -2
  176. package/dist/either/right/create.mjs +2 -3
  177. package/dist/either/right/is.cjs +2 -2
  178. package/dist/either/right/is.mjs +1 -1
  179. package/dist/either/right/ok.cjs +2 -2
  180. package/dist/either/right/ok.d.ts +1 -1
  181. package/dist/either/right/ok.mjs +2 -2
  182. package/dist/either/right/success.cjs +2 -2
  183. package/dist/either/right/success.d.ts +2 -2
  184. package/dist/either/right/success.mjs +2 -2
  185. package/dist/either/whenHasInformation.cjs +2 -2
  186. package/dist/either/whenHasInformation.d.ts +1 -1
  187. package/dist/either/whenHasInformation.mjs +1 -1
  188. package/dist/index.cjs +1 -0
  189. package/dist/index.mjs +1 -1
  190. package/dist/number/greater.cjs +12 -0
  191. package/dist/number/greater.d.ts +2 -0
  192. package/dist/number/greater.mjs +10 -0
  193. package/dist/number/greaterThan.cjs +12 -0
  194. package/dist/number/greaterThan.d.ts +2 -0
  195. package/dist/number/greaterThan.mjs +10 -0
  196. package/dist/number/index.cjs +8 -0
  197. package/dist/number/index.d.ts +4 -0
  198. package/dist/number/index.mjs +4 -0
  199. package/dist/number/less.cjs +12 -0
  200. package/dist/number/less.d.ts +2 -0
  201. package/dist/number/less.mjs +10 -0
  202. package/dist/number/lessThan.cjs +12 -0
  203. package/dist/number/lessThan.d.ts +2 -0
  204. package/dist/number/lessThan.mjs +10 -0
  205. package/dist/string/types/forbiddenCharacters.d.ts +5 -0
  206. package/dist/string/types/index.d.ts +1 -0
  207. package/package.json +1 -1
  208. package/dist/either/base.cjs +0 -7
  209. package/dist/either/base.d.ts +0 -1
  210. package/dist/either/base.mjs +0 -5
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var kind = require('../../common/kind.cjs');
3
+ var kind = require('../kind.cjs');
4
4
  var create = require('./create.cjs');
5
5
 
6
- const eitherErrorKind = kind.createKind("either-error");
6
+ const eitherErrorKind = kind.createEitherKind("error");
7
7
  function error(value) {
8
8
  return eitherErrorKind.setTo(create.left("error", value));
9
9
  }
@@ -1,6 +1,6 @@
1
1
  import { type Kind } from "../../common/kind";
2
2
  import { type EitherLeft } from "./create";
3
- export declare const eitherErrorKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"either-error", unknown>>;
3
+ export declare const eitherErrorKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@Either/error", unknown>>;
4
4
  type _EitherError<GenericValue extends unknown = unknown> = (EitherLeft<"error", GenericValue> & Kind<typeof eitherErrorKind.definition>);
5
5
  export interface EitherError<GenericValue extends unknown = unknown> extends _EitherError<GenericValue> {
6
6
  }
@@ -1,7 +1,7 @@
1
- import { createKind } from '../../common/kind.mjs';
1
+ import { createEitherKind } from '../kind.mjs';
2
2
  import { left } from './create.mjs';
3
3
 
4
- const eitherErrorKind = createKind("either-error");
4
+ const eitherErrorKind = createEitherKind("error");
5
5
  function error(value) {
6
6
  return eitherErrorKind.setTo(left("error", value));
7
7
  }
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var kind = require('../../common/kind.cjs');
3
+ var kind = require('../kind.cjs');
4
4
  var create = require('./create.cjs');
5
5
 
6
- const eitherFailKind = kind.createKind("either-fail");
6
+ const eitherFailKind = kind.createEitherKind("fail");
7
7
  function fail() {
8
8
  return eitherFailKind.setTo(create.left("fail", undefined));
9
9
  }
@@ -1,6 +1,6 @@
1
1
  import { type Kind } from "../../common/kind";
2
2
  import { type EitherLeft } from "./create";
3
- export declare const eitherFailKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"either-fail", unknown>>;
3
+ export declare const eitherFailKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@Either/fail", unknown>>;
4
4
  type _EitherFail = (EitherLeft<"fail", never> & Kind<typeof eitherFailKind.definition>);
5
5
  export interface EitherFail extends _EitherFail {
6
6
  }
@@ -1,7 +1,7 @@
1
- import { createKind } from '../../common/kind.mjs';
1
+ import { createEitherKind } from '../kind.mjs';
2
2
  import { left } from './create.mjs';
3
3
 
4
- const eitherFailKind = createKind("either-fail");
4
+ const eitherFailKind = createEitherKind("fail");
5
5
  function fail() {
6
6
  return eitherFailKind.setTo(left("fail", undefined));
7
7
  }
@@ -2,11 +2,11 @@
2
2
 
3
3
  var create = require('./create.cjs');
4
4
  var wrapValue = require('../../common/wrapValue.cjs');
5
- var base = require('../base.cjs');
5
+ var kind = require('../kind.cjs');
6
6
 
7
7
  function isLeft(input) {
8
8
  return create.eitherLeftKind.has(input)
9
- && base.eitherInformationKind.has(input)
9
+ && kind.eitherInformationKind.has(input)
10
10
  && wrapValue.isWrappedValue(input);
11
11
  }
12
12
 
@@ -1,6 +1,6 @@
1
1
  import { eitherLeftKind } from './create.mjs';
2
2
  import { isWrappedValue } from '../../common/wrapValue.mjs';
3
- import { eitherInformationKind } from '../base.mjs';
3
+ import { eitherInformationKind } from '../kind.mjs';
4
4
 
5
5
  function isLeft(input) {
6
6
  return eitherLeftKind.has(input)
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var kind = require('../../common/kind.cjs');
3
+ var kind = require('../kind.cjs');
4
4
 
5
- const eitherNullableKind = kind.createKind("either-nullable");
5
+ const eitherNullableKind = kind.createEitherKind("nullable");
6
6
 
7
7
  exports.eitherNullableKind = eitherNullableKind;
@@ -1 +1 @@
1
- export declare const eitherNullableKind: import("../../common").KindHandler<import("../../common").KindDefinition<"either-nullable", unknown>>;
1
+ export declare const eitherNullableKind: import("../..").KindHandler<import("../..").KindDefinition<"@Either/nullable", unknown>>;
@@ -1,5 +1,5 @@
1
- import { createKind } from '../../common/kind.mjs';
1
+ import { createEitherKind } from '../kind.mjs';
2
2
 
3
- const eitherNullableKind = createKind("either-nullable");
3
+ const eitherNullableKind = createEitherKind("nullable");
4
4
 
5
5
  export { eitherNullableKind };
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var kind = require('../../common/kind.cjs');
4
3
  var unwrap = require('../../common/unwrap.cjs');
5
4
  var create = require('../left/create.cjs');
5
+ var kind = require('../kind.cjs');
6
6
  var is = require('../left/is.cjs');
7
7
  var is$1 = require('../right/is.cjs');
8
8
  var create$1 = require('./create.cjs');
9
9
  var base = require('./base.cjs');
10
10
 
11
- const eitherNullableEmptyKind = kind.createKind("either-nullable-empty");
11
+ const eitherNullableEmptyKind = kind.createEitherKind("nullable-empty");
12
12
  function nullableEmpty() {
13
13
  return base.eitherNullableKind.setTo(eitherNullableEmptyKind.setTo(create.left("nullable", null)));
14
14
  }
@@ -4,7 +4,7 @@ import { type EitherLeft } from "../left";
4
4
  import { type EitherRight } from "../right";
5
5
  import { nullable } from "./create";
6
6
  import { eitherNullableKind } from "./base";
7
- export declare const eitherNullableEmptyKind: import("../../common").KindHandler<import("../../common").KindDefinition<"either-nullable-empty", unknown>>;
7
+ export declare const eitherNullableEmptyKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@Either/nullable-empty", unknown>>;
8
8
  type _EitherNullableEmpty = (EitherLeft<"nullable", null> & Kind<typeof eitherNullableKind.definition> & Kind<typeof eitherNullableEmptyKind.definition>);
9
9
  export interface EitherNullableEmpty extends _EitherNullableEmpty {
10
10
  }
@@ -1,12 +1,12 @@
1
- import { createKind } from '../../common/kind.mjs';
2
1
  import { unwrap } from '../../common/unwrap.mjs';
3
2
  import { left } from '../left/create.mjs';
3
+ import { createEitherKind } from '../kind.mjs';
4
4
  import { isLeft } from '../left/is.mjs';
5
5
  import { isRight } from '../right/is.mjs';
6
6
  import { nullable } from './create.mjs';
7
7
  import { eitherNullableKind } from './base.mjs';
8
8
 
9
- const eitherNullableEmptyKind = createKind("either-nullable-empty");
9
+ const eitherNullableEmptyKind = createEitherKind("nullable-empty");
10
10
  function nullableEmpty() {
11
11
  return eitherNullableKind.setTo(eitherNullableEmptyKind.setTo(left("nullable", null)));
12
12
  }
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var kind = require('../../common/kind.cjs');
4
3
  var unwrap = require('../../common/unwrap.cjs');
4
+ var kind = require('../kind.cjs');
5
5
  var is$1 = require('../left/is.cjs');
6
6
  var create = require('../right/create.cjs');
7
7
  var is = require('../right/is.cjs');
8
8
  var create$1 = require('./create.cjs');
9
9
  var base = require('./base.cjs');
10
10
 
11
- const eitherNullableFilledKind = kind.createKind("either-nullable-filled");
11
+ const eitherNullableFilledKind = kind.createEitherKind("nullable-filled");
12
12
  function nullableFilled(value) {
13
13
  return base.eitherNullableKind.setTo(eitherNullableFilledKind.setTo(create.right("nullable", value)));
14
14
  }
@@ -4,7 +4,7 @@ import { type EitherLeft } from "../left";
4
4
  import { type EitherRight } from "../right";
5
5
  import { nullable } from "./create";
6
6
  import { eitherNullableKind } from "./base";
7
- export declare const eitherNullableFilledKind: import("../../common").KindHandler<import("../../common").KindDefinition<"either-nullable-filled", unknown>>;
7
+ export declare const eitherNullableFilledKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@Either/nullable-filled", unknown>>;
8
8
  type _EitherNullableFilled<GenericValue extends unknown = unknown> = (EitherRight<"nullable", GenericValue> & Kind<typeof eitherNullableKind.definition> & Kind<typeof eitherNullableFilledKind.definition>);
9
9
  export interface EitherNullableFilled<GenericValue extends unknown = unknown> extends _EitherNullableFilled<GenericValue> {
10
10
  }
@@ -1,12 +1,12 @@
1
- import { createKind } from '../../common/kind.mjs';
2
1
  import { unwrap } from '../../common/unwrap.mjs';
2
+ import { createEitherKind } from '../kind.mjs';
3
3
  import { isLeft } from '../left/is.mjs';
4
4
  import { right } from '../right/create.mjs';
5
5
  import { isRight } from '../right/is.mjs';
6
6
  import { nullable } from './create.mjs';
7
7
  import { eitherNullableKind } from './base.mjs';
8
8
 
9
- const eitherNullableFilledKind = createKind("either-nullable-filled");
9
+ const eitherNullableFilledKind = createEitherKind("nullable-filled");
10
10
  function nullableFilled(value) {
11
11
  return eitherNullableKind.setTo(eitherNullableFilledKind.setTo(right("nullable", value)));
12
12
  }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var kind = require('../../common/kind.cjs');
3
+ var kind = require('../kind.cjs');
4
4
 
5
- const eitherNullishKind = kind.createKind("either-nullish");
5
+ const eitherNullishKind = kind.createEitherKind("nullish");
6
6
 
7
7
  exports.eitherNullishKind = eitherNullishKind;
@@ -1 +1 @@
1
- export declare const eitherNullishKind: import("../../common").KindHandler<import("../../common").KindDefinition<"either-nullish", unknown>>;
1
+ export declare const eitherNullishKind: import("../..").KindHandler<import("../..").KindDefinition<"@Either/nullish", unknown>>;
@@ -1,5 +1,5 @@
1
- import { createKind } from '../../common/kind.mjs';
1
+ import { createEitherKind } from '../kind.mjs';
2
2
 
3
- const eitherNullishKind = createKind("either-nullish");
3
+ const eitherNullishKind = createEitherKind("nullish");
4
4
 
5
5
  export { eitherNullishKind };
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var kind = require('../../common/kind.cjs');
4
3
  var unwrap = require('../../common/unwrap.cjs');
4
+ var kind = require('../kind.cjs');
5
5
  var create = require('../left/create.cjs');
6
6
  var is = require('../left/is.cjs');
7
7
  var is$1 = require('../right/is.cjs');
8
8
  var create$1 = require('./create.cjs');
9
9
  var base = require('./base.cjs');
10
10
 
11
- const eitherNullishEmptyKind = kind.createKind("either-nullish-empty");
11
+ const eitherNullishEmptyKind = kind.createEitherKind("nullish-empty");
12
12
  function nullishEmpty(value = undefined) {
13
13
  return base.eitherNullishKind.setTo(eitherNullishEmptyKind.setTo(create.left("nullish", value)));
14
14
  }
@@ -1,11 +1,11 @@
1
1
  import { type EscapeVoid, type AnyValue, type Unwrap, type BreakGenericLink } from "../../common";
2
+ import { type Kind } from "../../common/kind";
2
3
  import { type EitherLeft } from "../left";
3
4
  import { type EitherRight } from "../right";
4
5
  import { nullish } from "./create";
5
- import { type Kind } from "../../common/kind";
6
6
  import { eitherNullishKind } from "./base";
7
7
  export type NullishValue = null | undefined;
8
- export declare const eitherNullishEmptyKind: import("../../common").KindHandler<import("../../common").KindDefinition<"either-nullish-empty", unknown>>;
8
+ export declare const eitherNullishEmptyKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@Either/nullish-empty", unknown>>;
9
9
  type _EitherNullishEmpty<GenericValue extends NullishValue = NullishValue> = (EitherLeft<"nullish", GenericValue> & Kind<typeof eitherNullishKind.definition> & Kind<typeof eitherNullishEmptyKind.definition>);
10
10
  export interface EitherNullishEmpty<GenericValue extends NullishValue = NullishValue> extends _EitherNullishEmpty<GenericValue> {
11
11
  }
@@ -1,12 +1,12 @@
1
- import { createKind } from '../../common/kind.mjs';
2
1
  import { unwrap } from '../../common/unwrap.mjs';
2
+ import { createEitherKind } from '../kind.mjs';
3
3
  import { left } from '../left/create.mjs';
4
4
  import { isLeft } from '../left/is.mjs';
5
5
  import { isRight } from '../right/is.mjs';
6
6
  import { nullish } from './create.mjs';
7
7
  import { eitherNullishKind } from './base.mjs';
8
8
 
9
- const eitherNullishEmptyKind = createKind("either-nullish-empty");
9
+ const eitherNullishEmptyKind = createEitherKind("nullish-empty");
10
10
  function nullishEmpty(value = undefined) {
11
11
  return eitherNullishKind.setTo(eitherNullishEmptyKind.setTo(left("nullish", value)));
12
12
  }
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var kind = require('../../common/kind.cjs');
4
- var unwrap = require('../../common/unwrap.cjs');
3
+ var kind = require('../kind.cjs');
5
4
  var is$1 = require('../left/is.cjs');
5
+ var unwrap = require('../../common/unwrap.cjs');
6
6
  var create = require('../right/create.cjs');
7
7
  var is = require('../right/is.cjs');
8
8
  var create$1 = require('./create.cjs');
9
9
  var base = require('./base.cjs');
10
10
 
11
- const eitherNullishFilledKind = kind.createKind("either-nullish-filled");
11
+ const eitherNullishFilledKind = kind.createEitherKind("nullish-filled");
12
12
  function nullishFilled(value) {
13
13
  return base.eitherNullishKind.setTo(eitherNullishFilledKind.setTo(create.right("nullish", value)));
14
14
  }
@@ -4,7 +4,7 @@ import { nullish } from "./create";
4
4
  import { type Kind } from "../../common/kind";
5
5
  import { type EscapeVoid, type AnyValue, type Unwrap, type BreakGenericLink } from "../../common";
6
6
  import { eitherNullishKind } from "./base";
7
- export declare const eitherNullishFilledKind: import("../../common").KindHandler<import("../../common").KindDefinition<"either-nullish-filled", unknown>>;
7
+ export declare const eitherNullishFilledKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@Either/nullish-filled", unknown>>;
8
8
  type _EitherNullishFilled<GenericValue extends unknown = unknown> = (EitherRight<"nullish", GenericValue> & Kind<typeof eitherNullishKind.definition> & Kind<typeof eitherNullishFilledKind.definition>);
9
9
  export interface EitherNullishFilled<GenericValue extends unknown = unknown> extends _EitherNullishFilled<GenericValue> {
10
10
  }
@@ -1,12 +1,12 @@
1
- import { createKind } from '../../common/kind.mjs';
2
- import { unwrap } from '../../common/unwrap.mjs';
1
+ import { createEitherKind } from '../kind.mjs';
3
2
  import { isLeft } from '../left/is.mjs';
3
+ import { unwrap } from '../../common/unwrap.mjs';
4
4
  import { right } from '../right/create.mjs';
5
5
  import { isRight } from '../right/is.mjs';
6
6
  import { nullish } from './create.mjs';
7
7
  import { eitherNullishKind } from './base.mjs';
8
8
 
9
- const eitherNullishFilledKind = createKind("either-nullish-filled");
9
+ const eitherNullishFilledKind = createEitherKind("nullish-filled");
10
10
  function nullishFilled(value) {
11
11
  return eitherNullishKind.setTo(eitherNullishFilledKind.setTo(right("nullish", value)));
12
12
  }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var kind = require('../../common/kind.cjs');
3
+ var kind = require('../kind.cjs');
4
4
 
5
- const eitherOptionalKind = kind.createKind("either-optional");
5
+ const eitherOptionalKind = kind.createEitherKind("optional");
6
6
 
7
7
  exports.eitherOptionalKind = eitherOptionalKind;
@@ -1 +1 @@
1
- export declare const eitherOptionalKind: import("../../common").KindHandler<import("../../common").KindDefinition<"either-optional", unknown>>;
1
+ export declare const eitherOptionalKind: import("../..").KindHandler<import("../..").KindDefinition<"@Either/optional", unknown>>;
@@ -1,5 +1,5 @@
1
- import { createKind } from '../../common/kind.mjs';
1
+ import { createEitherKind } from '../kind.mjs';
2
2
 
3
- const eitherOptionalKind = createKind("either-optional");
3
+ const eitherOptionalKind = createEitherKind("optional");
4
4
 
5
5
  export { eitherOptionalKind };
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var kind = require('../../common/kind.cjs');
3
+ var kind = require('../kind.cjs');
4
+ var base = require('./base.cjs');
5
+ var create$1 = require('./create.cjs');
4
6
  var create = require('../left/create.cjs');
5
7
  var is = require('../left/is.cjs');
6
8
  var is$1 = require('../right/is.cjs');
7
- var create$1 = require('./create.cjs');
8
- var base = require('./base.cjs');
9
9
 
10
- const eitherOptionalEmptyKind = kind.createKind("either-optional-empty");
10
+ const eitherOptionalEmptyKind = kind.createEitherKind("optional-empty");
11
11
  function optionalEmpty() {
12
12
  return base.eitherOptionalKind.setTo(eitherOptionalEmptyKind.setTo(create.left("optional", undefined)));
13
13
  }
@@ -1,10 +1,10 @@
1
1
  import { type EscapeVoid, type AnyValue, type Unwrap, type BreakGenericLink } from "../../common";
2
2
  import { type Kind } from "../../common/kind";
3
+ import { eitherOptionalKind } from "./base";
4
+ import { optional } from "./create";
3
5
  import { type EitherLeft } from "../left";
4
6
  import { type EitherRight } from "../right";
5
- import { optional } from "./create";
6
- import { eitherOptionalKind } from "./base";
7
- export declare const eitherOptionalEmptyKind: import("../../common").KindHandler<import("../../common").KindDefinition<"either-optional-empty", unknown>>;
7
+ export declare const eitherOptionalEmptyKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@Either/optional-empty", unknown>>;
8
8
  type _EitherOptionalEmpty = (EitherLeft<"optional", undefined> & Kind<typeof eitherOptionalKind.definition> & Kind<typeof eitherOptionalEmptyKind.definition>);
9
9
  export interface EitherOptionalEmpty extends _EitherOptionalEmpty {
10
10
  }
@@ -1,11 +1,11 @@
1
- import { createKind } from '../../common/kind.mjs';
1
+ import { createEitherKind } from '../kind.mjs';
2
+ import { eitherOptionalKind } from './base.mjs';
3
+ import { optional } from './create.mjs';
2
4
  import { left } from '../left/create.mjs';
3
5
  import { isLeft } from '../left/is.mjs';
4
6
  import { isRight } from '../right/is.mjs';
5
- import { optional } from './create.mjs';
6
- import { eitherOptionalKind } from './base.mjs';
7
7
 
8
- const eitherOptionalEmptyKind = createKind("either-optional-empty");
8
+ const eitherOptionalEmptyKind = createEitherKind("optional-empty");
9
9
  function optionalEmpty() {
10
10
  return eitherOptionalKind.setTo(eitherOptionalEmptyKind.setTo(left("optional", undefined)));
11
11
  }
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var kind = require('../../common/kind.cjs');
4
3
  var unwrap = require('../../common/unwrap.cjs');
4
+ var kind = require('../kind.cjs');
5
+ var base = require('./base.cjs');
6
+ var create$1 = require('./create.cjs');
5
7
  var is$1 = require('../left/is.cjs');
6
8
  var create = require('../right/create.cjs');
7
9
  var is = require('../right/is.cjs');
8
- var create$1 = require('./create.cjs');
9
- var base = require('./base.cjs');
10
10
 
11
- const eitherOptionalFilledKind = kind.createKind("either-optional-filled");
11
+ const eitherOptionalFilledKind = kind.createEitherKind("optional-filled");
12
12
  function optionalFilled(value) {
13
13
  return base.eitherOptionalKind.setTo(eitherOptionalFilledKind.setTo(create.right("optional", value)));
14
14
  }
@@ -1,10 +1,10 @@
1
1
  import { type EscapeVoid, type AnyValue, type Unwrap, type BreakGenericLink } from "../../common";
2
2
  import { type Kind } from "../../common/kind";
3
+ import { eitherOptionalKind } from "./base";
4
+ import { optional } from "./create";
3
5
  import { type EitherLeft } from "../left";
4
6
  import { type EitherRight } from "../right";
5
- import { optional } from "./create";
6
- import { eitherOptionalKind } from "./base";
7
- export declare const eitherOptionalFilledKind: import("../../common").KindHandler<import("../../common").KindDefinition<"either-optional-filled", unknown>>;
7
+ export declare const eitherOptionalFilledKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@Either/optional-filled", unknown>>;
8
8
  type _EitherOptionalFilled<GenericValue extends unknown = unknown> = (EitherRight<"optional", GenericValue> & Kind<typeof eitherOptionalKind.definition> & Kind<typeof eitherOptionalFilledKind.definition>);
9
9
  export interface EitherOptionalFilled<GenericValue extends unknown = unknown> extends _EitherOptionalFilled<GenericValue> {
10
10
  }
@@ -1,12 +1,12 @@
1
- import { createKind } from '../../common/kind.mjs';
2
1
  import { unwrap } from '../../common/unwrap.mjs';
2
+ import { createEitherKind } from '../kind.mjs';
3
+ import { eitherOptionalKind } from './base.mjs';
4
+ import { optional } from './create.mjs';
3
5
  import { isLeft } from '../left/is.mjs';
4
6
  import { right } from '../right/create.mjs';
5
7
  import { isRight } from '../right/is.mjs';
6
- import { optional } from './create.mjs';
7
- import { eitherOptionalKind } from './base.mjs';
8
8
 
9
- const eitherOptionalFilledKind = createKind("either-optional-filled");
9
+ const eitherOptionalFilledKind = createEitherKind("optional-filled");
10
10
  function optionalFilled(value) {
11
11
  return eitherOptionalKind.setTo(eitherOptionalFilledKind.setTo(right("optional", value)));
12
12
  }
@@ -1,12 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var kind = require('../../common/kind.cjs');
4
3
  var wrapValue = require('../../common/wrapValue.cjs');
5
- var base = require('../base.cjs');
4
+ var kind = require('../kind.cjs');
6
5
 
7
- const eitherRightKind = kind.createKind("either-right");
6
+ const eitherRightKind = kind.createEitherKind("right");
8
7
  function right(information, value = undefined) {
9
- return eitherRightKind.setTo(base.eitherInformationKind.setTo(wrapValue.wrapValue(value), information));
8
+ return eitherRightKind.setTo(kind.eitherInformationKind.setTo(wrapValue.wrapValue(value), information));
10
9
  }
11
10
 
12
11
  exports.eitherRightKind = eitherRightKind;
@@ -1,7 +1,7 @@
1
1
  import { type Kind } from "../../common/kind";
2
2
  import { type WrappedValue } from "../../common/wrapValue";
3
- import { eitherInformationKind } from "../base";
4
- export declare const eitherRightKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"either-right", unknown>>;
3
+ import { eitherInformationKind } from "../kind";
4
+ export declare const eitherRightKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@Either/right", unknown>>;
5
5
  type _EitherRight<GenericInformation extends string = string, GenericValue extends unknown = unknown> = (Kind<typeof eitherRightKind.definition> & Kind<typeof eitherInformationKind.definition, GenericInformation> & WrappedValue<GenericValue>);
6
6
  export interface EitherRight<GenericInformation extends string = string, GenericValue extends unknown = unknown> extends _EitherRight<GenericInformation, GenericValue> {
7
7
  }
@@ -1,8 +1,7 @@
1
- import { createKind } from '../../common/kind.mjs';
2
1
  import { wrapValue } from '../../common/wrapValue.mjs';
3
- import { eitherInformationKind } from '../base.mjs';
2
+ import { createEitherKind, eitherInformationKind } from '../kind.mjs';
4
3
 
5
- const eitherRightKind = createKind("either-right");
4
+ const eitherRightKind = createEitherKind("right");
6
5
  function right(information, value = undefined) {
7
6
  return eitherRightKind.setTo(eitherInformationKind.setTo(wrapValue(value), information));
8
7
  }
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var base = require('../base.cjs');
3
+ var kind = require('../kind.cjs');
4
4
  var create = require('./create.cjs');
5
5
  var wrapValue = require('../../common/wrapValue.cjs');
6
6
 
7
7
  function isRight(input) {
8
8
  return create.eitherRightKind.has(input)
9
- && base.eitherInformationKind.has(input)
9
+ && kind.eitherInformationKind.has(input)
10
10
  && wrapValue.isWrappedValue(input);
11
11
  }
12
12
 
@@ -1,4 +1,4 @@
1
- import { eitherInformationKind } from '../base.mjs';
1
+ import { eitherInformationKind } from '../kind.mjs';
2
2
  import { eitherRightKind } from './create.mjs';
3
3
  import { isWrappedValue } from '../../common/wrapValue.mjs';
4
4
 
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var kind = require('../../common/kind.cjs');
3
+ var kind = require('../kind.cjs');
4
4
  var create = require('./create.cjs');
5
5
 
6
- const eitherOkKind = kind.createKind("either-ok");
6
+ const eitherOkKind = kind.createEitherKind("ok");
7
7
  function ok() {
8
8
  return eitherOkKind.setTo(create.right("ok", undefined));
9
9
  }
@@ -1,6 +1,6 @@
1
1
  import { type Kind } from "../../common/kind";
2
2
  import { type EitherRight } from "./create";
3
- export declare const eitherOkKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"either-ok", unknown>>;
3
+ export declare const eitherOkKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@Either/ok", unknown>>;
4
4
  type _EitherOk = (EitherRight<"ok", never> & Kind<typeof eitherOkKind.definition>);
5
5
  export interface EitherOk extends _EitherOk {
6
6
  }
@@ -1,7 +1,7 @@
1
- import { createKind } from '../../common/kind.mjs';
1
+ import { createEitherKind } from '../kind.mjs';
2
2
  import { right } from './create.mjs';
3
3
 
4
- const eitherOkKind = createKind("either-ok");
4
+ const eitherOkKind = createEitherKind("ok");
5
5
  function ok() {
6
6
  return eitherOkKind.setTo(right("ok", undefined));
7
7
  }
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
+ var kind = require('../kind.cjs');
3
4
  var create = require('./create.cjs');
4
- var kind = require('../../common/kind.cjs');
5
5
 
6
- const eitherSuccessKind = kind.createKind("either-success");
6
+ const eitherSuccessKind = kind.createEitherKind("success");
7
7
  function success(value) {
8
8
  return eitherSuccessKind.setTo(create.right("success", value));
9
9
  }
@@ -1,6 +1,6 @@
1
- import { type EitherRight } from "./create";
2
1
  import { type Kind } from "../../common/kind";
3
- export declare const eitherSuccessKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"either-success", unknown>>;
2
+ import { type EitherRight } from "./create";
3
+ export declare const eitherSuccessKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@Either/success", unknown>>;
4
4
  type _EitherSuccess<GenericValue extends unknown = unknown> = (EitherRight<"success", GenericValue> & Kind<typeof eitherSuccessKind.definition>);
5
5
  export interface EitherSuccess<GenericValue extends unknown = unknown> extends _EitherSuccess<GenericValue> {
6
6
  }
@@ -1,7 +1,7 @@
1
+ import { createEitherKind } from '../kind.mjs';
1
2
  import { right } from './create.mjs';
2
- import { createKind } from '../../common/kind.mjs';
3
3
 
4
- const eitherSuccessKind = createKind("either-success");
4
+ const eitherSuccessKind = createEitherKind("success");
5
5
  function success(value) {
6
6
  return eitherSuccessKind.setTo(right("success", value));
7
7
  }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var unwrap = require('../common/unwrap.cjs');
4
- var base = require('./base.cjs');
4
+ var kind = require('./kind.cjs');
5
5
  var is = require('./left/is.cjs');
6
6
  var is$1 = require('./right/is.cjs');
7
7
 
@@ -15,7 +15,7 @@ function whenHasInformation(...args) {
15
15
  ? information
16
16
  : [information];
17
17
  if ((is.isLeft(input)
18
- || is$1.isRight(input)) && formattedInformation.includes(base.eitherInformationKind.getValue(input))) {
18
+ || is$1.isRight(input)) && formattedInformation.includes(kind.eitherInformationKind.getValue(input))) {
19
19
  return theFunction(unwrap.unwrap(input));
20
20
  }
21
21
  return input;