@duplojs/utils 1.1.9 → 1.1.11

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 (259) 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/common/types/index.d.ts +1 -0
  13. package/dist/common/types/removeFromUnion.d.ts +2 -0
  14. package/dist/common/types/unionContain.d.ts +1 -1
  15. package/dist/dataParser/base.cjs +4 -3
  16. package/dist/dataParser/base.d.ts +4 -4
  17. package/dist/dataParser/base.mjs +4 -3
  18. package/dist/dataParser/baseExtended.cjs +4 -3
  19. package/dist/dataParser/baseExtended.d.ts +5 -5
  20. package/dist/dataParser/baseExtended.mjs +4 -3
  21. package/dist/dataParser/error.cjs +9 -9
  22. package/dist/dataParser/error.d.ts +10 -9
  23. package/dist/dataParser/error.mjs +7 -7
  24. package/dist/dataParser/extended/array.cjs +1 -0
  25. package/dist/dataParser/extended/array.d.ts +3 -2
  26. package/dist/dataParser/extended/array.mjs +1 -0
  27. package/dist/dataParser/extended/bigint.cjs +1 -0
  28. package/dist/dataParser/extended/bigint.mjs +1 -0
  29. package/dist/dataParser/extended/boolean.cjs +1 -0
  30. package/dist/dataParser/extended/boolean.mjs +1 -0
  31. package/dist/dataParser/extended/coerce/bigint.cjs +1 -0
  32. package/dist/dataParser/extended/coerce/bigint.mjs +1 -0
  33. package/dist/dataParser/extended/coerce/boolean.cjs +1 -0
  34. package/dist/dataParser/extended/coerce/boolean.mjs +1 -0
  35. package/dist/dataParser/extended/coerce/empty.cjs +1 -0
  36. package/dist/dataParser/extended/coerce/empty.mjs +1 -0
  37. package/dist/dataParser/extended/coerce/nil.cjs +1 -0
  38. package/dist/dataParser/extended/coerce/nil.mjs +1 -0
  39. package/dist/dataParser/extended/coerce/number.cjs +1 -0
  40. package/dist/dataParser/extended/coerce/number.mjs +1 -0
  41. package/dist/dataParser/extended/coerce/string.cjs +1 -0
  42. package/dist/dataParser/extended/coerce/string.mjs +1 -0
  43. package/dist/dataParser/extended/empty.cjs +1 -0
  44. package/dist/dataParser/extended/empty.mjs +1 -0
  45. package/dist/dataParser/extended/lazy.cjs +1 -0
  46. package/dist/dataParser/extended/lazy.d.ts +3 -2
  47. package/dist/dataParser/extended/lazy.mjs +1 -0
  48. package/dist/dataParser/extended/literal.cjs +1 -0
  49. package/dist/dataParser/extended/literal.mjs +1 -0
  50. package/dist/dataParser/extended/nil.cjs +1 -0
  51. package/dist/dataParser/extended/nil.mjs +1 -0
  52. package/dist/dataParser/extended/nullable.cjs +1 -0
  53. package/dist/dataParser/extended/nullable.d.ts +3 -2
  54. package/dist/dataParser/extended/nullable.mjs +1 -0
  55. package/dist/dataParser/extended/number.cjs +1 -0
  56. package/dist/dataParser/extended/number.mjs +1 -0
  57. package/dist/dataParser/extended/object.cjs +1 -0
  58. package/dist/dataParser/extended/object.mjs +1 -0
  59. package/dist/dataParser/extended/optional.cjs +1 -0
  60. package/dist/dataParser/extended/optional.d.ts +3 -2
  61. package/dist/dataParser/extended/optional.mjs +1 -0
  62. package/dist/dataParser/extended/pipe.cjs +1 -0
  63. package/dist/dataParser/extended/pipe.d.ts +3 -2
  64. package/dist/dataParser/extended/pipe.mjs +1 -0
  65. package/dist/dataParser/extended/record.cjs +1 -0
  66. package/dist/dataParser/extended/record.d.ts +3 -2
  67. package/dist/dataParser/extended/record.mjs +1 -0
  68. package/dist/dataParser/extended/string.cjs +1 -0
  69. package/dist/dataParser/extended/string.mjs +1 -0
  70. package/dist/dataParser/extended/templateLiteral.cjs +1 -0
  71. package/dist/dataParser/extended/templateLiteral.mjs +1 -0
  72. package/dist/dataParser/extended/transform.cjs +1 -0
  73. package/dist/dataParser/extended/transform.d.ts +3 -3
  74. package/dist/dataParser/extended/transform.mjs +1 -0
  75. package/dist/dataParser/extended/tuple.cjs +1 -0
  76. package/dist/dataParser/extended/tuple.mjs +1 -0
  77. package/dist/dataParser/extended/union.cjs +1 -0
  78. package/dist/dataParser/extended/union.mjs +1 -0
  79. package/dist/dataParser/extended/unknown.cjs +1 -0
  80. package/dist/dataParser/extended/unknown.mjs +1 -0
  81. package/dist/dataParser/identifier.cjs +32 -0
  82. package/dist/dataParser/identifier.d.ts +9 -0
  83. package/dist/dataParser/identifier.mjs +30 -0
  84. package/dist/dataParser/index.cjs +26 -24
  85. package/dist/dataParser/index.d.ts +1 -0
  86. package/dist/dataParser/index.mjs +23 -22
  87. package/dist/dataParser/kind.cjs +2 -1
  88. package/dist/dataParser/kind.d.ts +1 -1
  89. package/dist/dataParser/kind.mjs +2 -1
  90. package/dist/dataParser/parsers/array/checkers/max.d.ts +1 -1
  91. package/dist/dataParser/parsers/array/checkers/min.d.ts +1 -1
  92. package/dist/dataParser/parsers/array/index.cjs +3 -3
  93. package/dist/dataParser/parsers/array/index.d.ts +5 -5
  94. package/dist/dataParser/parsers/array/index.mjs +3 -3
  95. package/dist/dataParser/parsers/bigint/checkers/max.d.ts +1 -1
  96. package/dist/dataParser/parsers/bigint/checkers/min.d.ts +1 -1
  97. package/dist/dataParser/parsers/bigint/index.cjs +3 -3
  98. package/dist/dataParser/parsers/bigint/index.d.ts +2 -2
  99. package/dist/dataParser/parsers/bigint/index.mjs +3 -3
  100. package/dist/dataParser/parsers/boolean.cjs +3 -3
  101. package/dist/dataParser/parsers/boolean.d.ts +2 -2
  102. package/dist/dataParser/parsers/boolean.mjs +3 -3
  103. package/dist/dataParser/parsers/coerce/bigint.cjs +1 -0
  104. package/dist/dataParser/parsers/coerce/bigint.mjs +1 -0
  105. package/dist/dataParser/parsers/coerce/boolean.cjs +1 -0
  106. package/dist/dataParser/parsers/coerce/boolean.mjs +1 -0
  107. package/dist/dataParser/parsers/coerce/empty.cjs +1 -0
  108. package/dist/dataParser/parsers/coerce/empty.mjs +1 -0
  109. package/dist/dataParser/parsers/coerce/nil.cjs +1 -0
  110. package/dist/dataParser/parsers/coerce/nil.mjs +1 -0
  111. package/dist/dataParser/parsers/coerce/number.cjs +1 -0
  112. package/dist/dataParser/parsers/coerce/number.mjs +1 -0
  113. package/dist/dataParser/parsers/coerce/string.cjs +1 -0
  114. package/dist/dataParser/parsers/coerce/string.mjs +1 -0
  115. package/dist/dataParser/parsers/empty.cjs +3 -3
  116. package/dist/dataParser/parsers/empty.d.ts +2 -2
  117. package/dist/dataParser/parsers/empty.mjs +3 -3
  118. package/dist/dataParser/parsers/lazy.cjs +3 -3
  119. package/dist/dataParser/parsers/lazy.d.ts +5 -5
  120. package/dist/dataParser/parsers/lazy.mjs +3 -3
  121. package/dist/dataParser/parsers/literal.cjs +4 -3
  122. package/dist/dataParser/parsers/literal.d.ts +2 -2
  123. package/dist/dataParser/parsers/literal.mjs +4 -3
  124. package/dist/dataParser/parsers/nil.cjs +3 -3
  125. package/dist/dataParser/parsers/nil.d.ts +2 -2
  126. package/dist/dataParser/parsers/nil.mjs +3 -3
  127. package/dist/dataParser/parsers/nullable.cjs +3 -3
  128. package/dist/dataParser/parsers/nullable.d.ts +5 -5
  129. package/dist/dataParser/parsers/nullable.mjs +3 -3
  130. package/dist/dataParser/parsers/number/checkers/int.d.ts +1 -1
  131. package/dist/dataParser/parsers/number/checkers/max.d.ts +1 -1
  132. package/dist/dataParser/parsers/number/checkers/min.d.ts +1 -1
  133. package/dist/dataParser/parsers/number/index.cjs +3 -3
  134. package/dist/dataParser/parsers/number/index.d.ts +2 -2
  135. package/dist/dataParser/parsers/number/index.mjs +3 -3
  136. package/dist/dataParser/parsers/object.cjs +4 -3
  137. package/dist/dataParser/parsers/object.d.ts +5 -5
  138. package/dist/dataParser/parsers/object.mjs +4 -3
  139. package/dist/dataParser/parsers/optional.cjs +3 -3
  140. package/dist/dataParser/parsers/optional.d.ts +5 -5
  141. package/dist/dataParser/parsers/optional.mjs +3 -3
  142. package/dist/dataParser/parsers/pipe.cjs +3 -3
  143. package/dist/dataParser/parsers/pipe.d.ts +6 -6
  144. package/dist/dataParser/parsers/pipe.mjs +3 -3
  145. package/dist/dataParser/parsers/record.cjs +3 -3
  146. package/dist/dataParser/parsers/record.d.ts +7 -7
  147. package/dist/dataParser/parsers/record.mjs +3 -3
  148. package/dist/dataParser/parsers/string/checkers/email.d.ts +1 -1
  149. package/dist/dataParser/parsers/string/checkers/max.d.ts +1 -1
  150. package/dist/dataParser/parsers/string/checkers/min.d.ts +1 -1
  151. package/dist/dataParser/parsers/string/checkers/regex.d.ts +1 -1
  152. package/dist/dataParser/parsers/string/checkers/url.d.ts +1 -1
  153. package/dist/dataParser/parsers/string/index.cjs +3 -3
  154. package/dist/dataParser/parsers/string/index.d.ts +2 -2
  155. package/dist/dataParser/parsers/string/index.mjs +3 -3
  156. package/dist/dataParser/parsers/templateLiteral.cjs +5 -4
  157. package/dist/dataParser/parsers/templateLiteral.d.ts +2 -2
  158. package/dist/dataParser/parsers/templateLiteral.mjs +12 -11
  159. package/dist/dataParser/parsers/transform.cjs +3 -3
  160. package/dist/dataParser/parsers/transform.d.ts +5 -5
  161. package/dist/dataParser/parsers/transform.mjs +3 -3
  162. package/dist/dataParser/parsers/tuple.cjs +3 -3
  163. package/dist/dataParser/parsers/tuple.d.ts +11 -11
  164. package/dist/dataParser/parsers/tuple.mjs +3 -3
  165. package/dist/dataParser/parsers/union.cjs +3 -3
  166. package/dist/dataParser/parsers/union.d.ts +4 -4
  167. package/dist/dataParser/parsers/union.mjs +3 -3
  168. package/dist/dataParser/parsers/unknown.cjs +3 -3
  169. package/dist/dataParser/parsers/unknown.d.ts +2 -2
  170. package/dist/dataParser/parsers/unknown.mjs +3 -3
  171. package/dist/dataParser/types/checkers.d.ts +5 -1
  172. package/dist/dataParser/types/dataParsers.d.ts +9 -1
  173. package/dist/either/bool/base.d.ts +1 -1
  174. package/dist/either/bool/falsy.cjs +1 -0
  175. package/dist/either/bool/falsy.d.ts +1 -1
  176. package/dist/either/bool/falsy.mjs +1 -0
  177. package/dist/either/bool/truthy.cjs +1 -0
  178. package/dist/either/bool/truthy.d.ts +1 -1
  179. package/dist/either/bool/truthy.mjs +1 -0
  180. package/dist/either/future/base.d.ts +1 -1
  181. package/dist/either/future/create.cjs +1 -0
  182. package/dist/either/future/create.mjs +1 -0
  183. package/dist/either/future/error.cjs +1 -0
  184. package/dist/either/future/error.d.ts +1 -1
  185. package/dist/either/future/error.mjs +1 -0
  186. package/dist/either/future/success.cjs +1 -0
  187. package/dist/either/future/success.d.ts +1 -1
  188. package/dist/either/future/success.mjs +1 -0
  189. package/dist/either/kind.cjs +2 -1
  190. package/dist/either/kind.d.ts +2 -2
  191. package/dist/either/kind.mjs +2 -1
  192. package/dist/either/left/create.d.ts +1 -1
  193. package/dist/either/left/error.d.ts +1 -1
  194. package/dist/either/left/fail.d.ts +1 -1
  195. package/dist/either/left/when.cjs +1 -0
  196. package/dist/either/left/when.mjs +1 -0
  197. package/dist/either/nullable/base.d.ts +1 -1
  198. package/dist/either/nullable/empty.cjs +1 -0
  199. package/dist/either/nullable/empty.d.ts +1 -1
  200. package/dist/either/nullable/empty.mjs +1 -0
  201. package/dist/either/nullable/filled.cjs +1 -0
  202. package/dist/either/nullable/filled.d.ts +1 -1
  203. package/dist/either/nullable/filled.mjs +1 -0
  204. package/dist/either/nullish/base.d.ts +1 -1
  205. package/dist/either/nullish/empty.cjs +1 -0
  206. package/dist/either/nullish/empty.d.ts +1 -1
  207. package/dist/either/nullish/empty.mjs +1 -0
  208. package/dist/either/nullish/filled.cjs +1 -0
  209. package/dist/either/nullish/filled.d.ts +1 -1
  210. package/dist/either/nullish/filled.mjs +1 -0
  211. package/dist/either/optional/base.d.ts +1 -1
  212. package/dist/either/optional/empty.cjs +1 -0
  213. package/dist/either/optional/empty.d.ts +1 -1
  214. package/dist/either/optional/empty.mjs +1 -0
  215. package/dist/either/optional/filled.cjs +1 -0
  216. package/dist/either/optional/filled.d.ts +1 -1
  217. package/dist/either/optional/filled.mjs +1 -0
  218. package/dist/either/right/asyncPipe.cjs +1 -0
  219. package/dist/either/right/asyncPipe.mjs +1 -0
  220. package/dist/either/right/create.d.ts +1 -1
  221. package/dist/either/right/ok.d.ts +1 -1
  222. package/dist/either/right/pipe.cjs +1 -0
  223. package/dist/either/right/pipe.mjs +1 -0
  224. package/dist/either/right/success.d.ts +1 -1
  225. package/dist/either/right/when.cjs +1 -0
  226. package/dist/either/right/when.mjs +1 -0
  227. package/dist/either/whenHasInformation.cjs +1 -0
  228. package/dist/either/whenHasInformation.mjs +1 -0
  229. package/dist/generator/asyncReduce.cjs +1 -0
  230. package/dist/generator/asyncReduce.mjs +1 -0
  231. package/dist/generator/reduce.cjs +1 -0
  232. package/dist/generator/reduce.mjs +1 -0
  233. package/dist/index.cjs +4 -0
  234. package/dist/index.mjs +1 -0
  235. package/dist/number/index.cjs +4 -0
  236. package/dist/number/index.d.ts +2 -0
  237. package/dist/number/index.mjs +2 -0
  238. package/dist/number/sqrt.cjs +7 -0
  239. package/dist/number/sqrt.d.ts +1 -0
  240. package/dist/number/sqrt.mjs +5 -0
  241. package/dist/number/toFixed.cjs +12 -0
  242. package/dist/number/toFixed.d.ts +2 -0
  243. package/dist/number/toFixed.mjs +10 -0
  244. package/dist/object/deepDiscriminate.cjs +1 -0
  245. package/dist/object/deepDiscriminate.mjs +1 -0
  246. package/dist/object/discriminate.cjs +1 -0
  247. package/dist/object/discriminate.mjs +1 -0
  248. package/dist/object/entries.cjs +1 -0
  249. package/dist/object/entries.mjs +1 -0
  250. package/dist/object/keys.cjs +1 -0
  251. package/dist/object/keys.mjs +1 -0
  252. package/dist/pattern/exhaustive.cjs +1 -0
  253. package/dist/pattern/exhaustive.mjs +1 -0
  254. package/dist/pattern/otherwise.cjs +1 -0
  255. package/dist/pattern/otherwise.mjs +1 -0
  256. package/dist/pattern/result.cjs +1 -0
  257. package/dist/pattern/result.mjs +1 -0
  258. package/dist/string/types/forbiddenString.d.ts +0 -1
  259. package/package.json +1 -1
@@ -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 is = require('./is.cjs');
6
7
 
7
8
  function whenIsLeft(...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 { isLeft } from './is.mjs';
4
5
 
5
6
  function whenIsLeft(...args) {
@@ -1 +1 @@
1
- export declare const eitherNullableKind: import("../..").KindHandler<import("../..").KindDefinition<"@Either/nullable", unknown>>;
1
+ export declare const eitherNullableKind: import("../..").KindHandler<import("../..").KindDefinition<"@DuplojsUtilsEither/nullable", unknown>>;
@@ -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 create = require('../left/create.cjs');
6
7
  var kind = require('../kind.cjs');
7
8
  var is = require('../left/is.cjs');
@@ -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<"@DuplojsUtilsEither/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,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 { left } from '../left/create.mjs';
4
5
  import { createEitherKind } from '../kind.mjs';
5
6
  import { isLeft } from '../left/is.mjs';
@@ -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 kind = require('../kind.cjs');
6
7
  var is$1 = require('../left/is.cjs');
7
8
  var create = require('../right/create.cjs');
@@ -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<"@DuplojsUtilsEither/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,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 { createEitherKind } from '../kind.mjs';
4
5
  import { isLeft } from '../left/is.mjs';
5
6
  import { right } from '../right/create.mjs';
@@ -1 +1 @@
1
- export declare const eitherNullishKind: import("../..").KindHandler<import("../..").KindDefinition<"@Either/nullish", unknown>>;
1
+ export declare const eitherNullishKind: import("../..").KindHandler<import("../..").KindDefinition<"@DuplojsUtilsEither/nullish", unknown>>;
@@ -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 kind = require('../kind.cjs');
6
7
  var create = require('../left/create.cjs');
7
8
  var is = require('../left/is.cjs');
@@ -5,7 +5,7 @@ import { type EitherRight } from "../right";
5
5
  import { nullish } from "./create";
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<"@DuplojsUtilsEither/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,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 { createEitherKind } from '../kind.mjs';
4
5
  import { left } from '../left/create.mjs';
5
6
  import { isLeft } from '../left/is.mjs';
@@ -4,6 +4,7 @@ var kind = require('../kind.cjs');
4
4
  var is$1 = require('../left/is.cjs');
5
5
  var unwrap = require('../../common/unwrap.cjs');
6
6
  require('../../common/globalStore.cjs');
7
+ require('../../common/builder.cjs');
7
8
  var create = require('../right/create.cjs');
8
9
  var is = require('../right/is.cjs');
9
10
  var create$1 = require('./create.cjs');
@@ -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<"@DuplojsUtilsEither/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
  }
@@ -2,6 +2,7 @@ import { createEitherKind } from '../kind.mjs';
2
2
  import { isLeft } from '../left/is.mjs';
3
3
  import { unwrap } from '../../common/unwrap.mjs';
4
4
  import '../../common/globalStore.mjs';
5
+ import '../../common/builder.mjs';
5
6
  import { right } from '../right/create.mjs';
6
7
  import { isRight } from '../right/is.mjs';
7
8
  import { nullish } from './create.mjs';
@@ -1 +1 @@
1
- export declare const eitherOptionalKind: import("../..").KindHandler<import("../..").KindDefinition<"@Either/optional", unknown>>;
1
+ export declare const eitherOptionalKind: import("../..").KindHandler<import("../..").KindDefinition<"@DuplojsUtilsEither/optional", unknown>>;
@@ -6,6 +6,7 @@ var create$1 = require('./create.cjs');
6
6
  var create = require('../left/create.cjs');
7
7
  var is = require('../left/is.cjs');
8
8
  require('../../common/globalStore.cjs');
9
+ require('../../common/builder.cjs');
9
10
  var is$1 = require('../right/is.cjs');
10
11
 
11
12
  const eitherOptionalEmptyKind = kind.createEitherKind("optional-empty");
@@ -4,7 +4,7 @@ import { eitherOptionalKind } from "./base";
4
4
  import { optional } from "./create";
5
5
  import { type EitherLeft } from "../left";
6
6
  import { type EitherRight } from "../right";
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<"@DuplojsUtilsEither/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
  }
@@ -4,6 +4,7 @@ import { optional } from './create.mjs';
4
4
  import { left } from '../left/create.mjs';
5
5
  import { isLeft } from '../left/is.mjs';
6
6
  import '../../common/globalStore.mjs';
7
+ import '../../common/builder.mjs';
7
8
  import { isRight } from '../right/is.mjs';
8
9
 
9
10
  const eitherOptionalEmptyKind = createEitherKind("optional-empty");
@@ -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 kind = require('../kind.cjs');
6
7
  var base = require('./base.cjs');
7
8
  var create$1 = require('./create.cjs');
@@ -4,7 +4,7 @@ import { eitherOptionalKind } from "./base";
4
4
  import { optional } from "./create";
5
5
  import { type EitherLeft } from "../left";
6
6
  import { type EitherRight } from "../right";
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<"@DuplojsUtilsEither/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,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 { createEitherKind } from '../kind.mjs';
4
5
  import { eitherOptionalKind } from './base.mjs';
5
6
  import { optional } from './create.mjs';
@@ -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 is = require('../left/is.cjs');
6
7
  var create = require('../future/create.cjs');
7
8
  var success = require('./success.cjs');
@@ -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 { isLeft } from '../left/is.mjs';
4
5
  import { future } from '../future/create.mjs';
5
6
  import { success } from './success.mjs';
@@ -1,7 +1,7 @@
1
1
  import { type Kind } from "../../common/kind";
2
2
  import { type WrappedValue } from "../../common/wrapValue";
3
3
  import { eitherInformationKind } from "../kind";
4
- export declare const eitherRightKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@Either/right", unknown>>;
4
+ export declare const eitherRightKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@DuplojsUtilsEither/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,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<"@DuplojsUtilsEither/ok", unknown>>;
4
4
  type _EitherOk = (EitherRight<"ok", never> & Kind<typeof eitherOkKind.definition>);
5
5
  export interface EitherOk extends _EitherOk {
6
6
  }
@@ -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 is = require('../left/is.cjs');
6
7
  var success = require('./success.cjs');
7
8
  var is$1 = require('./is.cjs');
@@ -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 { isLeft } from '../left/is.mjs';
4
5
  import { success } from './success.mjs';
5
6
  import { isRight } from './is.mjs';
@@ -1,6 +1,6 @@
1
1
  import { type Kind } from "../../common/kind";
2
2
  import { type EitherRight } from "./create";
3
- export declare const eitherSuccessKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@Either/success", unknown>>;
3
+ export declare const eitherSuccessKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@DuplojsUtilsEither/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
  }
@@ -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 is = require('./is.cjs');
6
7
 
7
8
  function whenIsRight(...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 { isRight } from './is.mjs';
4
5
 
5
6
  function whenIsRight(...args) {
@@ -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 kind = require('./kind.cjs');
6
7
  var is = require('./left/is.cjs');
7
8
  var is$1 = require('./right/is.cjs');
@@ -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 { eitherInformationKind } from './kind.mjs';
4
5
  import { isLeft } from './left/is.mjs';
5
6
  import { isRight } from './right/is.mjs';
@@ -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 asyncReduce(...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 asyncReduce(...args) {
@@ -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 generatorReduceFromKind = kind.createKind("generator-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 generatorReduceFromKind = createKind("generator-reduce-from");
package/dist/index.cjs CHANGED
@@ -38,6 +38,7 @@ var justReturn = require('./common/justReturn.cjs');
38
38
  var memo = require('./common/memo.cjs');
39
39
  var instanceOf = require('./common/instanceOf.cjs');
40
40
  var globalStore = require('./common/globalStore.cjs');
41
+ var builder = require('./common/builder.cjs');
41
42
  var index = require('./array/index.cjs');
42
43
  var index$1 = require('./number/index.cjs');
43
44
  var index$2 = require('./either/index.cjs');
@@ -99,6 +100,9 @@ exports.justReturn = justReturn.justReturn;
99
100
  exports.memo = memo.memo;
100
101
  exports.instanceOf = instanceOf.instanceOf;
101
102
  exports.createGlobalStore = globalStore.createGlobalStore;
103
+ exports.MissingBuilderMethodsError = builder.MissingBuilderMethodsError;
104
+ exports.builderKind = builder.builderKind;
105
+ exports.createBuilder = builder.createBuilder;
102
106
  exports.A = index;
103
107
  exports.DArray = index;
104
108
  exports.DNumber = index$1;
package/dist/index.mjs CHANGED
@@ -36,6 +36,7 @@ export { justReturn } from './common/justReturn.mjs';
36
36
  export { memo } from './common/memo.mjs';
37
37
  export { instanceOf } from './common/instanceOf.mjs';
38
38
  export { createGlobalStore } from './common/globalStore.mjs';
39
+ export { MissingBuilderMethodsError, builderKind, createBuilder } from './common/builder.mjs';
39
40
  import * as index from './array/index.mjs';
40
41
  export { index as A };
41
42
  export { index as DArray };
@@ -26,6 +26,8 @@ var greater = require('./greater.cjs');
26
26
  var less = require('./less.cjs');
27
27
  var greaterThan = require('./greaterThan.cjs');
28
28
  var lessThan = require('./lessThan.cjs');
29
+ var toFixed = require('./toFixed.cjs');
30
+ var sqrt = require('./sqrt.cjs');
29
31
 
30
32
 
31
33
 
@@ -55,3 +57,5 @@ exports.greater = greater.greater;
55
57
  exports.less = less.less;
56
58
  exports.greaterThan = greaterThan.greaterThan;
57
59
  exports.lessThan = lessThan.lessThan;
60
+ exports.toFixed = toFixed.toFixed;
61
+ exports.sqrt = sqrt.sqrt;
@@ -24,3 +24,5 @@ export * from "./greater";
24
24
  export * from "./less";
25
25
  export * from "./greaterThan";
26
26
  export * from "./lessThan";
27
+ export * from "./toFixed";
28
+ export * from "./sqrt";
@@ -24,3 +24,5 @@ export { greater } from './greater.mjs';
24
24
  export { less } from './less.mjs';
25
25
  export { greaterThan } from './greaterThan.mjs';
26
26
  export { lessThan } from './lessThan.mjs';
27
+ export { toFixed } from './toFixed.mjs';
28
+ export { sqrt } from './sqrt.mjs';
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ function sqrt(value) {
4
+ return Math.sqrt(value);
5
+ }
6
+
7
+ exports.sqrt = sqrt;
@@ -0,0 +1 @@
1
+ export declare function sqrt<GenericValue extends number>(value: GenericValue): number;
@@ -0,0 +1,5 @@
1
+ function sqrt(value) {
2
+ return Math.sqrt(value);
3
+ }
4
+
5
+ export { sqrt };
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ function toFixed(...args) {
4
+ if (args.length === 1) {
5
+ const [digits] = args;
6
+ return (value) => toFixed(value, digits);
7
+ }
8
+ const [value, digits] = args;
9
+ return value.toFixed(digits);
10
+ }
11
+
12
+ exports.toFixed = toFixed;
@@ -0,0 +1,2 @@
1
+ export declare function toFixed<GenericValue extends number>(digits: number): (value: GenericValue) => string;
2
+ export declare function toFixed<GenericValue extends number>(value: GenericValue, digits: number): string;
@@ -0,0 +1,10 @@
1
+ function toFixed(...args) {
2
+ if (args.length === 1) {
3
+ const [digits] = args;
4
+ return (value) => toFixed(value, digits);
5
+ }
6
+ const [value, digits] = args;
7
+ return value.toFixed(digits);
8
+ }
9
+
10
+ export { toFixed };
@@ -3,6 +3,7 @@
3
3
  var equal = require('../common/equal.cjs');
4
4
  var getDeepProperty = require('./getDeepProperty.cjs');
5
5
  require('../common/globalStore.cjs');
6
+ require('../common/builder.cjs');
6
7
 
7
8
  function deepDiscriminate(...args) {
8
9
  if (args.length === 2) {
@@ -1,6 +1,7 @@
1
1
  import { equal } from '../common/equal.mjs';
2
2
  import { getDeepProperty } from './getDeepProperty.mjs';
3
3
  import '../common/globalStore.mjs';
4
+ import '../common/builder.mjs';
4
5
 
5
6
  function deepDiscriminate(...args) {
6
7
  if (args.length === 2) {
@@ -2,6 +2,7 @@
2
2
 
3
3
  var equal = require('../common/equal.cjs');
4
4
  require('../common/globalStore.cjs');
5
+ require('../common/builder.cjs');
5
6
 
6
7
  function discriminate(...args) {
7
8
  if (args.length === 2) {
@@ -1,5 +1,6 @@
1
1
  import { equal } from '../common/equal.mjs';
2
2
  import '../common/globalStore.mjs';
3
+ import '../common/builder.mjs';
3
4
 
4
5
  function discriminate(...args) {
5
6
  if (args.length === 2) {
@@ -3,6 +3,7 @@
3
3
  var kind = require('../common/kind.cjs');
4
4
  var wrapValue = require('../common/wrapValue.cjs');
5
5
  require('../common/globalStore.cjs');
6
+ require('../common/builder.cjs');
6
7
 
7
8
  function entries(object) {
8
9
  return Object.entries(object)
@@ -1,6 +1,7 @@
1
1
  import { isRuntimeKind } from '../common/kind.mjs';
2
2
  import { isRuntimeWrappedValueKey } from '../common/wrapValue.mjs';
3
3
  import '../common/globalStore.mjs';
4
+ import '../common/builder.mjs';
4
5
 
5
6
  function entries(object) {
6
7
  return Object.entries(object)
@@ -3,6 +3,7 @@
3
3
  var kind = require('../common/kind.cjs');
4
4
  var wrapValue = require('../common/wrapValue.cjs');
5
5
  require('../common/globalStore.cjs');
6
+ require('../common/builder.cjs');
6
7
 
7
8
  function keys(object) {
8
9
  return Object.keys(object)
@@ -1,6 +1,7 @@
1
1
  import { isRuntimeKind } from '../common/kind.mjs';
2
2
  import { isRuntimeWrappedValueKey } from '../common/wrapValue.mjs';
3
3
  import '../common/globalStore.mjs';
4
+ import '../common/builder.mjs';
4
5
 
5
6
  function keys(object) {
6
7
  return Object.keys(object)
@@ -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
 
6
7
  function exhaustive(result) {
7
8
  return unwrap.unwrap(result);
@@ -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
 
4
5
  function exhaustive(result) {
5
6
  return unwrap(result);
@@ -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 result = require('./result.cjs');
6
7
 
7
8
  function otherwise(...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 { isResult } from './result.mjs';
4
5
 
5
6
  function otherwise(...args) {
@@ -3,6 +3,7 @@
3
3
  var kind = require('../common/kind.cjs');
4
4
  var wrapValue = require('../common/wrapValue.cjs');
5
5
  require('../common/globalStore.cjs');
6
+ require('../common/builder.cjs');
6
7
 
7
8
  const patternResultKind = kind.createKind("pattern-result");
8
9
  function result(value) {
@@ -1,6 +1,7 @@
1
1
  import { createKind } from '../common/kind.mjs';
2
2
  import { wrapValue } from '../common/wrapValue.mjs';
3
3
  import '../common/globalStore.mjs';
4
+ import '../common/builder.mjs';
4
5
 
5
6
  const patternResultKind = createKind("pattern-result");
6
7
  function result(value) {
@@ -1,7 +1,6 @@
1
1
  import { type IsEqual } from "../../common";
2
2
  import { type Includes } from "../../string";
3
3
  declare const SymbolErrorForbiddenString: unique symbol;
4
- type SymbolErrorForbiddenString = typeof SymbolErrorForbiddenString;
5
4
  export type ForbiddenString<GenericValue extends string, GenericCharacters extends string> = IsEqual<(GenericCharacters extends string ? Includes<GenericValue, GenericCharacters> : never) | false, boolean> extends true ? {
6
5
  [SymbolErrorForbiddenString]: `String "${GenericCharacters}" is forbidden in value.`;
7
6
  } : GenericValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duplojs/utils",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "author": "mathcovax",
5
5
  "license": "MIT",
6
6
  "type": "module",