@duplojs/utils 1.2.16 → 1.2.17

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 (235) hide show
  1. package/dist/array/index.cjs +28 -28
  2. package/dist/array/index.mjs +14 -14
  3. package/dist/array/reduce.cjs +0 -27
  4. package/dist/array/reduce.mjs +0 -27
  5. package/dist/array/reduceRight.cjs +0 -27
  6. package/dist/array/reduceRight.mjs +0 -27
  7. package/dist/common/createKindIdentifier.cjs +1 -26
  8. package/dist/common/createKindIdentifier.mjs +1 -26
  9. package/dist/common/instanceOf.cjs +0 -27
  10. package/dist/common/instanceOf.mjs +0 -27
  11. package/dist/common/override.cjs +1 -26
  12. package/dist/common/override.mjs +1 -26
  13. package/dist/dataParser/base.cjs +3 -27
  14. package/dist/dataParser/base.mjs +3 -27
  15. package/dist/dataParser/baseExtended.cjs +9 -71
  16. package/dist/dataParser/baseExtended.mjs +9 -71
  17. package/dist/dataParser/extended/array.cjs +1 -48
  18. package/dist/dataParser/extended/array.mjs +1 -48
  19. package/dist/dataParser/extended/bigint.cjs +1 -48
  20. package/dist/dataParser/extended/bigint.mjs +1 -48
  21. package/dist/dataParser/extended/boolean.cjs +1 -48
  22. package/dist/dataParser/extended/boolean.mjs +1 -48
  23. package/dist/dataParser/extended/coerce/bigint.cjs +0 -21
  24. package/dist/dataParser/extended/coerce/bigint.mjs +0 -21
  25. package/dist/dataParser/extended/coerce/boolean.cjs +0 -21
  26. package/dist/dataParser/extended/coerce/boolean.mjs +0 -21
  27. package/dist/dataParser/extended/coerce/date.cjs +0 -21
  28. package/dist/dataParser/extended/coerce/date.mjs +0 -21
  29. package/dist/dataParser/extended/coerce/empty.cjs +0 -21
  30. package/dist/dataParser/extended/coerce/empty.mjs +0 -21
  31. package/dist/dataParser/extended/coerce/nil.cjs +0 -21
  32. package/dist/dataParser/extended/coerce/nil.mjs +0 -21
  33. package/dist/dataParser/extended/coerce/number.cjs +0 -21
  34. package/dist/dataParser/extended/coerce/number.mjs +0 -21
  35. package/dist/dataParser/extended/coerce/string.cjs +0 -21
  36. package/dist/dataParser/extended/coerce/string.mjs +0 -21
  37. package/dist/dataParser/extended/date.cjs +1 -48
  38. package/dist/dataParser/extended/date.mjs +1 -48
  39. package/dist/dataParser/extended/empty.cjs +1 -48
  40. package/dist/dataParser/extended/empty.mjs +1 -48
  41. package/dist/dataParser/extended/lazy.cjs +1 -48
  42. package/dist/dataParser/extended/lazy.mjs +1 -48
  43. package/dist/dataParser/extended/literal.cjs +1 -48
  44. package/dist/dataParser/extended/literal.mjs +1 -48
  45. package/dist/dataParser/extended/nil.cjs +1 -48
  46. package/dist/dataParser/extended/nil.mjs +1 -48
  47. package/dist/dataParser/extended/nullable.cjs +1 -48
  48. package/dist/dataParser/extended/nullable.mjs +1 -48
  49. package/dist/dataParser/extended/number.cjs +1 -48
  50. package/dist/dataParser/extended/number.mjs +1 -48
  51. package/dist/dataParser/extended/object.cjs +5 -52
  52. package/dist/dataParser/extended/object.mjs +5 -52
  53. package/dist/dataParser/extended/optional.cjs +1 -48
  54. package/dist/dataParser/extended/optional.mjs +1 -48
  55. package/dist/dataParser/extended/pipe.cjs +1 -48
  56. package/dist/dataParser/extended/pipe.mjs +1 -48
  57. package/dist/dataParser/extended/record.cjs +1 -48
  58. package/dist/dataParser/extended/record.mjs +1 -48
  59. package/dist/dataParser/extended/recover.cjs +1 -48
  60. package/dist/dataParser/extended/recover.mjs +1 -48
  61. package/dist/dataParser/extended/string.cjs +1 -48
  62. package/dist/dataParser/extended/string.mjs +1 -48
  63. package/dist/dataParser/extended/templateLiteral.cjs +1 -48
  64. package/dist/dataParser/extended/templateLiteral.mjs +1 -48
  65. package/dist/dataParser/extended/transform.cjs +1 -48
  66. package/dist/dataParser/extended/transform.mjs +1 -48
  67. package/dist/dataParser/extended/tuple.cjs +1 -48
  68. package/dist/dataParser/extended/tuple.mjs +1 -48
  69. package/dist/dataParser/extended/union.cjs +1 -48
  70. package/dist/dataParser/extended/union.mjs +1 -48
  71. package/dist/dataParser/extended/unknown.cjs +1 -48
  72. package/dist/dataParser/extended/unknown.mjs +1 -48
  73. package/dist/dataParser/identifier.cjs +0 -5
  74. package/dist/dataParser/identifier.mjs +0 -5
  75. package/dist/dataParser/index.cjs +52 -52
  76. package/dist/dataParser/index.mjs +19 -19
  77. package/dist/dataParser/kind.cjs +0 -27
  78. package/dist/dataParser/kind.mjs +0 -27
  79. package/dist/dataParser/parsers/array/index.cjs +1 -33
  80. package/dist/dataParser/parsers/array/index.mjs +1 -29
  81. package/dist/dataParser/parsers/bigint/index.cjs +1 -33
  82. package/dist/dataParser/parsers/bigint/index.mjs +1 -29
  83. package/dist/dataParser/parsers/boolean.cjs +1 -27
  84. package/dist/dataParser/parsers/boolean.mjs +1 -27
  85. package/dist/dataParser/parsers/coerce/bigint.cjs +0 -21
  86. package/dist/dataParser/parsers/coerce/bigint.mjs +0 -21
  87. package/dist/dataParser/parsers/coerce/boolean.cjs +0 -21
  88. package/dist/dataParser/parsers/coerce/boolean.mjs +0 -21
  89. package/dist/dataParser/parsers/coerce/date.cjs +0 -21
  90. package/dist/dataParser/parsers/coerce/date.mjs +0 -21
  91. package/dist/dataParser/parsers/coerce/empty.cjs +0 -21
  92. package/dist/dataParser/parsers/coerce/empty.mjs +0 -21
  93. package/dist/dataParser/parsers/coerce/nil.cjs +0 -21
  94. package/dist/dataParser/parsers/coerce/nil.mjs +0 -21
  95. package/dist/dataParser/parsers/coerce/number.cjs +0 -21
  96. package/dist/dataParser/parsers/coerce/number.mjs +0 -21
  97. package/dist/dataParser/parsers/coerce/string.cjs +0 -21
  98. package/dist/dataParser/parsers/coerce/string.mjs +0 -21
  99. package/dist/dataParser/parsers/date.cjs +2 -31
  100. package/dist/dataParser/parsers/date.mjs +2 -31
  101. package/dist/dataParser/parsers/empty.cjs +1 -27
  102. package/dist/dataParser/parsers/empty.mjs +1 -27
  103. package/dist/dataParser/parsers/lazy.cjs +2 -28
  104. package/dist/dataParser/parsers/lazy.mjs +2 -28
  105. package/dist/dataParser/parsers/literal.cjs +2 -28
  106. package/dist/dataParser/parsers/literal.mjs +2 -28
  107. package/dist/dataParser/parsers/nil.cjs +1 -27
  108. package/dist/dataParser/parsers/nil.mjs +1 -27
  109. package/dist/dataParser/parsers/nullable.cjs +1 -27
  110. package/dist/dataParser/parsers/nullable.mjs +1 -27
  111. package/dist/dataParser/parsers/number/index.cjs +1 -37
  112. package/dist/dataParser/parsers/number/index.mjs +1 -30
  113. package/dist/dataParser/parsers/object/index.cjs +7 -33
  114. package/dist/dataParser/parsers/object/index.mjs +7 -33
  115. package/dist/dataParser/parsers/object/omit.cjs +2 -29
  116. package/dist/dataParser/parsers/object/omit.mjs +2 -29
  117. package/dist/dataParser/parsers/object/pick.cjs +2 -29
  118. package/dist/dataParser/parsers/object/pick.mjs +2 -29
  119. package/dist/dataParser/parsers/optional.cjs +1 -27
  120. package/dist/dataParser/parsers/optional.mjs +1 -27
  121. package/dist/dataParser/parsers/pipe.cjs +1 -27
  122. package/dist/dataParser/parsers/pipe.mjs +1 -27
  123. package/dist/dataParser/parsers/record/findRecordRequiredKey.cjs +17 -46
  124. package/dist/dataParser/parsers/record/findRecordRequiredKey.mjs +17 -46
  125. package/dist/dataParser/parsers/record/index.cjs +1 -27
  126. package/dist/dataParser/parsers/record/index.mjs +1 -27
  127. package/dist/dataParser/parsers/recover.cjs +1 -27
  128. package/dist/dataParser/parsers/recover.mjs +1 -27
  129. package/dist/dataParser/parsers/string/index.cjs +1 -44
  130. package/dist/dataParser/parsers/string/index.mjs +1 -32
  131. package/dist/dataParser/parsers/templateLiteral/createTemplateLiteralPattern.cjs +14 -43
  132. package/dist/dataParser/parsers/templateLiteral/createTemplateLiteralPattern.mjs +14 -43
  133. package/dist/dataParser/parsers/templateLiteral/index.cjs +2 -28
  134. package/dist/dataParser/parsers/templateLiteral/index.mjs +2 -28
  135. package/dist/dataParser/parsers/transform.cjs +1 -27
  136. package/dist/dataParser/parsers/transform.mjs +1 -27
  137. package/dist/dataParser/parsers/tuple.cjs +1 -27
  138. package/dist/dataParser/parsers/tuple.mjs +1 -27
  139. package/dist/dataParser/parsers/union.cjs +1 -27
  140. package/dist/dataParser/parsers/union.mjs +1 -27
  141. package/dist/dataParser/parsers/unknown.cjs +1 -27
  142. package/dist/dataParser/parsers/unknown.mjs +1 -27
  143. package/dist/date/create.cjs +0 -25
  144. package/dist/date/create.mjs +0 -25
  145. package/dist/date/createOrThrow.cjs +2 -29
  146. package/dist/date/createOrThrow.mjs +2 -29
  147. package/dist/date/getters/getDayOfMonth.cjs +0 -30
  148. package/dist/date/getters/getDayOfMonth.mjs +0 -30
  149. package/dist/date/getters/getDayOfWeek.cjs +0 -30
  150. package/dist/date/getters/getDayOfWeek.mjs +0 -30
  151. package/dist/date/getters/getDayOfYear.cjs +0 -30
  152. package/dist/date/getters/getDayOfYear.mjs +0 -30
  153. package/dist/date/getters/getHour.cjs +0 -30
  154. package/dist/date/getters/getHour.mjs +0 -30
  155. package/dist/date/getters/getMilliseconds.cjs +0 -30
  156. package/dist/date/getters/getMilliseconds.mjs +0 -30
  157. package/dist/date/getters/getMinute.cjs +0 -30
  158. package/dist/date/getters/getMinute.mjs +0 -30
  159. package/dist/date/getters/getMonth.cjs +0 -30
  160. package/dist/date/getters/getMonth.mjs +0 -30
  161. package/dist/date/getters/getSecond.cjs +0 -30
  162. package/dist/date/getters/getSecond.mjs +0 -30
  163. package/dist/date/getters/getWeekOfYear.cjs +0 -30
  164. package/dist/date/getters/getWeekOfYear.mjs +0 -30
  165. package/dist/date/getters/getYear.cjs +0 -30
  166. package/dist/date/getters/getYear.mjs +0 -30
  167. package/dist/date/index.cjs +15 -15
  168. package/dist/date/index.mjs +7 -7
  169. package/dist/date/toTimestamp.cjs +2 -29
  170. package/dist/date/toTimestamp.mjs +2 -29
  171. package/dist/either/bool/falsy.cjs +3 -26
  172. package/dist/either/bool/falsy.mjs +3 -26
  173. package/dist/either/bool/truthy.cjs +5 -28
  174. package/dist/either/bool/truthy.mjs +5 -28
  175. package/dist/either/future/create.cjs +2 -27
  176. package/dist/either/future/create.mjs +2 -27
  177. package/dist/either/future/error.cjs +2 -25
  178. package/dist/either/future/error.mjs +2 -25
  179. package/dist/either/future/success.cjs +0 -23
  180. package/dist/either/future/success.mjs +0 -23
  181. package/dist/either/index.cjs +7 -7
  182. package/dist/either/index.mjs +3 -3
  183. package/dist/either/kind.cjs +0 -26
  184. package/dist/either/kind.mjs +0 -26
  185. package/dist/either/left/when.cjs +1 -28
  186. package/dist/either/left/when.mjs +1 -28
  187. package/dist/either/nullable/empty.cjs +4 -27
  188. package/dist/either/nullable/empty.mjs +4 -27
  189. package/dist/either/nullable/filled.cjs +4 -27
  190. package/dist/either/nullable/filled.mjs +4 -27
  191. package/dist/either/nullish/empty.cjs +4 -27
  192. package/dist/either/nullish/empty.mjs +4 -27
  193. package/dist/either/nullish/filled.cjs +4 -27
  194. package/dist/either/nullish/filled.mjs +4 -27
  195. package/dist/either/optional/empty.cjs +0 -23
  196. package/dist/either/optional/empty.mjs +0 -23
  197. package/dist/either/optional/filled.cjs +6 -29
  198. package/dist/either/optional/filled.mjs +6 -29
  199. package/dist/either/right/asyncPipe.cjs +3 -29
  200. package/dist/either/right/asyncPipe.mjs +3 -29
  201. package/dist/either/right/pipe.cjs +2 -28
  202. package/dist/either/right/pipe.mjs +2 -28
  203. package/dist/either/right/when.cjs +1 -28
  204. package/dist/either/right/when.mjs +1 -28
  205. package/dist/either/whenHasInformation.cjs +2 -28
  206. package/dist/either/whenHasInformation.mjs +2 -28
  207. package/dist/generator/asyncReduce.cjs +0 -27
  208. package/dist/generator/asyncReduce.mjs +0 -27
  209. package/dist/generator/reduce.cjs +0 -27
  210. package/dist/generator/reduce.mjs +0 -27
  211. package/dist/index.cjs +33 -33
  212. package/dist/index.mjs +33 -33
  213. package/dist/object/deepDiscriminate.cjs +1 -28
  214. package/dist/object/deepDiscriminate.mjs +1 -28
  215. package/dist/object/discriminate.cjs +0 -27
  216. package/dist/object/discriminate.mjs +0 -27
  217. package/dist/object/entries.cjs +1 -28
  218. package/dist/object/entries.mjs +1 -28
  219. package/dist/object/keys.cjs +1 -28
  220. package/dist/object/keys.mjs +1 -28
  221. package/dist/object/values.cjs +1 -28
  222. package/dist/object/values.mjs +1 -28
  223. package/dist/pattern/exhaustive.cjs +0 -27
  224. package/dist/pattern/exhaustive.mjs +0 -27
  225. package/dist/pattern/index.cjs +2 -2
  226. package/dist/pattern/index.mjs +1 -1
  227. package/dist/pattern/match/builder.cjs +2 -28
  228. package/dist/pattern/match/builder.mjs +2 -28
  229. package/dist/pattern/otherwise.cjs +1 -28
  230. package/dist/pattern/otherwise.mjs +1 -28
  231. package/dist/pattern/result.cjs +0 -27
  232. package/dist/pattern/result.mjs +0 -27
  233. package/dist/string/index.cjs +12 -12
  234. package/dist/string/index.mjs +6 -6
  235. package/package.json +2 -1
@@ -1,31 +1,4 @@
1
- import '../common/stringToBytes.mjs';
2
- import '../common/stringToMillisecond.mjs';
3
1
  import { unwrap } from '../common/unwrap.mjs';
4
- import '../common/globalStore.mjs';
5
- import '../common/builder.mjs';
6
- import '../either/bool/falsy.mjs';
7
- import '../either/bool/truthy.mjs';
8
- import '../either/bool/base.mjs';
9
- import '../either/left/create.mjs';
10
- import '../either/left/error.mjs';
11
- import '../either/left/fail.mjs';
12
- import '../either/kind.mjs';
13
- import '../either/right/success.mjs';
14
- import '../either/right/create.mjs';
15
- import '../either/right/ok.mjs';
16
- import '../either/future/success.mjs';
17
- import '../either/future/error.mjs';
18
- import '../either/future/base.mjs';
19
- import '../either/nullable/empty.mjs';
20
- import '../either/nullable/filled.mjs';
21
- import '../either/nullable/base.mjs';
22
- import '../either/nullish/empty.mjs';
23
- import '../either/nullish/filled.mjs';
24
- import '../either/nullish/base.mjs';
25
- import '../either/optional/empty.mjs';
26
- import '../either/optional/filled.mjs';
27
- import '../either/optional/base.mjs';
28
- import '../common/override.mjs';
29
2
 
30
3
  function exhaustive(result) {
31
4
  return unwrap(result);
@@ -5,10 +5,10 @@ var exhaustive = require('./exhaustive.cjs');
5
5
  var otherwise = require('./otherwise.cjs');
6
6
  var index = require('./match/index.cjs');
7
7
  var isMatch = require('./isMatch.cjs');
8
- var pattern = require('./types/pattern.cjs');
9
8
  var union = require('./union.cjs');
10
9
  var when = require('./when.cjs');
11
10
  var builder = require('./match/builder.cjs');
11
+ var pattern = require('./types/pattern.cjs');
12
12
 
13
13
 
14
14
 
@@ -18,8 +18,8 @@ exports.exhaustive = exhaustive.exhaustive;
18
18
  exports.otherwise = otherwise.otherwise;
19
19
  exports.match = index.match;
20
20
  exports.isMatch = isMatch.isMatch;
21
- exports.SymbolToolPatternFunctionLabel = pattern.SymbolToolPatternFunctionLabel;
22
21
  exports.union = union.union;
23
22
  exports.when = when.when;
24
23
  exports.InvalidExhaustivePatternError = builder.InvalidExhaustivePatternError;
25
24
  exports.matchBuilder = builder.matchBuilder;
25
+ exports.SymbolToolPatternFunctionLabel = pattern.SymbolToolPatternFunctionLabel;
@@ -3,7 +3,7 @@ export { exhaustive } from './exhaustive.mjs';
3
3
  export { otherwise } from './otherwise.mjs';
4
4
  export { match } from './match/index.mjs';
5
5
  export { isMatch } from './isMatch.mjs';
6
- export { SymbolToolPatternFunctionLabel } from './types/pattern.mjs';
7
6
  export { union } from './union.mjs';
8
7
  export { when } from './when.mjs';
9
8
  export { InvalidExhaustivePatternError, matchBuilder } from './match/builder.mjs';
9
+ export { SymbolToolPatternFunctionLabel } from './types/pattern.mjs';
@@ -1,35 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var kind = require('../../common/kind.cjs');
4
- require('../../common/stringToBytes.cjs');
5
- require('../../common/stringToMillisecond.cjs');
6
- require('../../common/globalStore.cjs');
3
+ var isMatch = require('../isMatch.cjs');
7
4
  var builder = require('../../common/builder.cjs');
8
- require('../../either/bool/falsy.cjs');
9
- require('../../either/bool/truthy.cjs');
10
- require('../../either/bool/base.cjs');
11
- require('../../either/left/create.cjs');
12
- require('../../either/left/error.cjs');
13
- require('../../either/left/fail.cjs');
14
- require('../../either/kind.cjs');
15
- require('../../either/right/success.cjs');
16
- require('../../either/right/create.cjs');
17
- require('../../either/right/ok.cjs');
18
- require('../../either/future/success.cjs');
19
- require('../../either/future/error.cjs');
20
- require('../../either/future/base.cjs');
21
- require('../../either/nullable/empty.cjs');
22
- require('../../either/nullable/filled.cjs');
23
- require('../../either/nullable/base.cjs');
24
- require('../../either/nullish/empty.cjs');
25
- require('../../either/nullish/filled.cjs');
26
- require('../../either/nullish/base.cjs');
27
- require('../../either/optional/empty.cjs');
28
- require('../../either/optional/filled.cjs');
29
- require('../../either/optional/base.cjs');
30
- require('../../common/override.cjs');
5
+ var kind = require('../../common/kind.cjs');
31
6
  var errorKindNamespace = require('../../common/errorKindNamespace.cjs');
32
- var isMatch = require('../isMatch.cjs');
33
7
 
34
8
  class InvalidExhaustivePatternError extends kind.kindHeritage("invalid-exhaustive-pattern-error", errorKindNamespace.createErrorKind("invalid-exhaustive-pattern-error"), Error) {
35
9
  input;
@@ -1,33 +1,7 @@
1
- import { kindHeritage } from '../../common/kind.mjs';
2
- import '../../common/stringToBytes.mjs';
3
- import '../../common/stringToMillisecond.mjs';
4
- import '../../common/globalStore.mjs';
1
+ import { isMatch } from '../isMatch.mjs';
5
2
  import { createBuilder } from '../../common/builder.mjs';
6
- import '../../either/bool/falsy.mjs';
7
- import '../../either/bool/truthy.mjs';
8
- import '../../either/bool/base.mjs';
9
- import '../../either/left/create.mjs';
10
- import '../../either/left/error.mjs';
11
- import '../../either/left/fail.mjs';
12
- import '../../either/kind.mjs';
13
- import '../../either/right/success.mjs';
14
- import '../../either/right/create.mjs';
15
- import '../../either/right/ok.mjs';
16
- import '../../either/future/success.mjs';
17
- import '../../either/future/error.mjs';
18
- import '../../either/future/base.mjs';
19
- import '../../either/nullable/empty.mjs';
20
- import '../../either/nullable/filled.mjs';
21
- import '../../either/nullable/base.mjs';
22
- import '../../either/nullish/empty.mjs';
23
- import '../../either/nullish/filled.mjs';
24
- import '../../either/nullish/base.mjs';
25
- import '../../either/optional/empty.mjs';
26
- import '../../either/optional/filled.mjs';
27
- import '../../either/optional/base.mjs';
28
- import '../../common/override.mjs';
3
+ import { kindHeritage } from '../../common/kind.mjs';
29
4
  import { createErrorKind } from '../../common/errorKindNamespace.mjs';
30
- import { isMatch } from '../isMatch.mjs';
31
5
 
32
6
  class InvalidExhaustivePatternError extends kindHeritage("invalid-exhaustive-pattern-error", createErrorKind("invalid-exhaustive-pattern-error"), Error) {
33
7
  input;
@@ -1,34 +1,7 @@
1
1
  'use strict';
2
2
 
3
- require('../common/stringToBytes.cjs');
4
- require('../common/stringToMillisecond.cjs');
5
- var unwrap = require('../common/unwrap.cjs');
6
- require('../common/globalStore.cjs');
7
- require('../common/builder.cjs');
8
- require('../either/bool/falsy.cjs');
9
- require('../either/bool/truthy.cjs');
10
- require('../either/bool/base.cjs');
11
- require('../either/left/create.cjs');
12
- require('../either/left/error.cjs');
13
- require('../either/left/fail.cjs');
14
- require('../either/kind.cjs');
15
- require('../either/right/success.cjs');
16
- require('../either/right/create.cjs');
17
- require('../either/right/ok.cjs');
18
- require('../either/future/success.cjs');
19
- require('../either/future/error.cjs');
20
- require('../either/future/base.cjs');
21
- require('../either/nullable/empty.cjs');
22
- require('../either/nullable/filled.cjs');
23
- require('../either/nullable/base.cjs');
24
- require('../either/nullish/empty.cjs');
25
- require('../either/nullish/filled.cjs');
26
- require('../either/nullish/base.cjs');
27
- require('../either/optional/empty.cjs');
28
- require('../either/optional/filled.cjs');
29
- require('../either/optional/base.cjs');
30
- require('../common/override.cjs');
31
3
  var result = require('./result.cjs');
4
+ var unwrap = require('../common/unwrap.cjs');
32
5
 
33
6
  function otherwise(...args) {
34
7
  if (args.length === 1) {
@@ -1,32 +1,5 @@
1
- import '../common/stringToBytes.mjs';
2
- import '../common/stringToMillisecond.mjs';
3
- import { unwrap } from '../common/unwrap.mjs';
4
- import '../common/globalStore.mjs';
5
- import '../common/builder.mjs';
6
- import '../either/bool/falsy.mjs';
7
- import '../either/bool/truthy.mjs';
8
- import '../either/bool/base.mjs';
9
- import '../either/left/create.mjs';
10
- import '../either/left/error.mjs';
11
- import '../either/left/fail.mjs';
12
- import '../either/kind.mjs';
13
- import '../either/right/success.mjs';
14
- import '../either/right/create.mjs';
15
- import '../either/right/ok.mjs';
16
- import '../either/future/success.mjs';
17
- import '../either/future/error.mjs';
18
- import '../either/future/base.mjs';
19
- import '../either/nullable/empty.mjs';
20
- import '../either/nullable/filled.mjs';
21
- import '../either/nullable/base.mjs';
22
- import '../either/nullish/empty.mjs';
23
- import '../either/nullish/filled.mjs';
24
- import '../either/nullish/base.mjs';
25
- import '../either/optional/empty.mjs';
26
- import '../either/optional/filled.mjs';
27
- import '../either/optional/base.mjs';
28
- import '../common/override.mjs';
29
1
  import { isResult } from './result.mjs';
2
+ import { unwrap } from '../common/unwrap.mjs';
30
3
 
31
4
  function otherwise(...args) {
32
5
  if (args.length === 1) {
@@ -1,34 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var kind = require('../common/kind.cjs');
4
- require('../common/stringToBytes.cjs');
5
- require('../common/stringToMillisecond.cjs');
6
4
  var wrapValue = require('../common/wrapValue.cjs');
7
- require('../common/globalStore.cjs');
8
- require('../common/builder.cjs');
9
- require('../either/bool/falsy.cjs');
10
- require('../either/bool/truthy.cjs');
11
- require('../either/bool/base.cjs');
12
- require('../either/left/create.cjs');
13
- require('../either/left/error.cjs');
14
- require('../either/left/fail.cjs');
15
- require('../either/kind.cjs');
16
- require('../either/right/success.cjs');
17
- require('../either/right/create.cjs');
18
- require('../either/right/ok.cjs');
19
- require('../either/future/success.cjs');
20
- require('../either/future/error.cjs');
21
- require('../either/future/base.cjs');
22
- require('../either/nullable/empty.cjs');
23
- require('../either/nullable/filled.cjs');
24
- require('../either/nullable/base.cjs');
25
- require('../either/nullish/empty.cjs');
26
- require('../either/nullish/filled.cjs');
27
- require('../either/nullish/base.cjs');
28
- require('../either/optional/empty.cjs');
29
- require('../either/optional/filled.cjs');
30
- require('../either/optional/base.cjs');
31
- require('../common/override.cjs');
32
5
 
33
6
  const patternResultKind = kind.createKind("pattern-result");
34
7
  function result(value) {
@@ -1,32 +1,5 @@
1
1
  import { createKind } from '../common/kind.mjs';
2
- import '../common/stringToBytes.mjs';
3
- import '../common/stringToMillisecond.mjs';
4
2
  import { wrapValue } from '../common/wrapValue.mjs';
5
- import '../common/globalStore.mjs';
6
- import '../common/builder.mjs';
7
- import '../either/bool/falsy.mjs';
8
- import '../either/bool/truthy.mjs';
9
- import '../either/bool/base.mjs';
10
- import '../either/left/create.mjs';
11
- import '../either/left/error.mjs';
12
- import '../either/left/fail.mjs';
13
- import '../either/kind.mjs';
14
- import '../either/right/success.mjs';
15
- import '../either/right/create.mjs';
16
- import '../either/right/ok.mjs';
17
- import '../either/future/success.mjs';
18
- import '../either/future/error.mjs';
19
- import '../either/future/base.mjs';
20
- import '../either/nullable/empty.mjs';
21
- import '../either/nullable/filled.mjs';
22
- import '../either/nullable/base.mjs';
23
- import '../either/nullish/empty.mjs';
24
- import '../either/nullish/filled.mjs';
25
- import '../either/nullish/base.mjs';
26
- import '../either/optional/empty.mjs';
27
- import '../either/optional/filled.mjs';
28
- import '../either/optional/base.mjs';
29
- import '../common/override.mjs';
30
3
 
31
4
  const patternResultKind = createKind("pattern-result");
32
5
  function result(value) {
@@ -1,16 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var isKeyof = require('./isKeyof.cjs');
4
- var _default = require('./at/default.cjs');
5
- var first = require('./at/first.cjs');
6
- var last = require('./at/last.cjs');
7
4
  var split = require('./split.cjs');
8
5
  var charAt = require('./charAt.cjs');
9
6
  var toUpperCase = require('./toUpperCase.cjs');
10
7
  var toLowerCase = require('./toLowerCase.cjs');
11
- var _default$1 = require('./trim/default.cjs');
12
- var end = require('./trim/end.cjs');
13
- var start = require('./trim/start.cjs');
14
8
  var capitalize = require('./capitalize.cjs');
15
9
  var uncapitalize = require('./uncapitalize.cjs');
16
10
  var substring = require('./substring.cjs');
@@ -33,20 +27,20 @@ var normalize = require('./normalize.cjs');
33
27
  var test = require('./test.cjs');
34
28
  var isIn = require('./isIn.cjs');
35
29
  var length = require('./length.cjs');
30
+ var _default = require('./at/default.cjs');
31
+ var first = require('./at/first.cjs');
32
+ var last = require('./at/last.cjs');
33
+ var _default$1 = require('./trim/default.cjs');
34
+ var end = require('./trim/end.cjs');
35
+ var start = require('./trim/start.cjs');
36
36
 
37
37
 
38
38
 
39
39
  exports.isKeyof = isKeyof.isKeyof;
40
- exports.at = _default.at;
41
- exports.first = first.first;
42
- exports.last = last.last;
43
40
  exports.split = split.split;
44
41
  exports.charAt = charAt.charAt;
45
42
  exports.toUpperCase = toUpperCase.toUpperCase;
46
43
  exports.toLowerCase = toLowerCase.toLowerCase;
47
- exports.trim = _default$1.trim;
48
- exports.trimEnd = end.trimEnd;
49
- exports.trimStart = start.trimStart;
50
44
  exports.capitalize = capitalize.capitalize;
51
45
  exports.uncapitalize = uncapitalize.uncapitalize;
52
46
  exports.substring = substring.substring;
@@ -69,3 +63,9 @@ exports.normalize = normalize.normalize;
69
63
  exports.test = test.test;
70
64
  exports.isIn = isIn.isIn;
71
65
  exports.length = length.length;
66
+ exports.at = _default.at;
67
+ exports.first = first.first;
68
+ exports.last = last.last;
69
+ exports.trim = _default$1.trim;
70
+ exports.trimEnd = end.trimEnd;
71
+ exports.trimStart = start.trimStart;
@@ -1,14 +1,8 @@
1
1
  export { isKeyof } from './isKeyof.mjs';
2
- export { at } from './at/default.mjs';
3
- export { first } from './at/first.mjs';
4
- export { last } from './at/last.mjs';
5
2
  export { split } from './split.mjs';
6
3
  export { charAt } from './charAt.mjs';
7
4
  export { toUpperCase } from './toUpperCase.mjs';
8
5
  export { toLowerCase } from './toLowerCase.mjs';
9
- export { trim } from './trim/default.mjs';
10
- export { trimEnd } from './trim/end.mjs';
11
- export { trimStart } from './trim/start.mjs';
12
6
  export { capitalize } from './capitalize.mjs';
13
7
  export { uncapitalize } from './uncapitalize.mjs';
14
8
  export { substring } from './substring.mjs';
@@ -31,3 +25,9 @@ export { normalize } from './normalize.mjs';
31
25
  export { test } from './test.mjs';
32
26
  export { isIn } from './isIn.mjs';
33
27
  export { length } from './length.mjs';
28
+ export { at } from './at/default.mjs';
29
+ export { first } from './at/first.mjs';
30
+ export { last } from './at/last.mjs';
31
+ export { trim } from './trim/default.mjs';
32
+ export { trimEnd } from './trim/end.mjs';
33
+ export { trimStart } from './trim/start.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duplojs/utils",
3
- "version": "1.2.16",
3
+ "version": "1.2.17",
4
4
  "author": "mathcovax",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,6 +19,7 @@
19
19
  "test:lint:fix": "eslint --fix",
20
20
  "prepare": "husky"
21
21
  },
22
+ "sideEffects": false,
22
23
  "types": "./dist/index.d.ts",
23
24
  "exports": {
24
25
  ".": {