@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
@@ -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 };
@@ -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.10",
4
4
  "author": "mathcovax",
5
5
  "license": "MIT",
6
6
  "type": "module",