@orioro/util 0.0.0 → 0.1.0

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 (163) hide show
  1. package/README.md +1 -0
  2. package/babel.config.cjs +13 -0
  3. package/coverage/clover.xml +488 -45
  4. package/coverage/coverage-final.json +28 -2
  5. package/coverage/lcov-report/ValidationError.ts.html +184 -0
  6. package/coverage/lcov-report/base.css +19 -7
  7. package/coverage/lcov-report/block-navigation.js +87 -0
  8. package/coverage/lcov-report/favicon.png +0 -0
  9. package/coverage/lcov-report/index.html +248 -58
  10. package/coverage/lcov-report/prettify.js +1 -0
  11. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  12. package/coverage/lcov-report/sorter.js +52 -14
  13. package/coverage/lcov-report/src/debug/deepFreeze.ts.html +157 -0
  14. package/coverage/lcov-report/src/debug/index.html +146 -0
  15. package/coverage/lcov-report/src/debug/index.ts.html +91 -0
  16. package/coverage/lcov-report/src/debug/wait.ts.html +127 -0
  17. package/coverage/lcov-report/src/index.html +131 -0
  18. package/coverage/lcov-report/src/interpolate/index.html +116 -0
  19. package/coverage/lcov-report/src/interpolate/index.ts.html +277 -0
  20. package/coverage/lcov-report/src/maybeFn.ts.html +94 -0
  21. package/coverage/lcov-report/src/promise/index.html +146 -0
  22. package/coverage/lcov-report/src/promise/index.ts.html +91 -0
  23. package/coverage/lcov-report/src/promise/promiseReduce.ts.html +130 -0
  24. package/coverage/lcov-report/src/promise/resolveNestedPromises.ts.html +271 -0
  25. package/coverage/lcov-report/src/switchValue.ts.html +253 -0
  26. package/coverage/lcov-report/src/typeOf.ts.html +328 -0
  27. package/coverage/lcov-report/src/validate/ValidationError.ts.html +184 -0
  28. package/coverage/lcov-report/src/validate/async/index.html +131 -0
  29. package/coverage/lcov-report/src/validate/async/index.ts.html +241 -0
  30. package/coverage/lcov-report/src/validate/async/parseValidator.ts.html +136 -0
  31. package/coverage/lcov-report/src/validate/async/validateAsyncFn.ts.html +208 -0
  32. package/coverage/lcov-report/src/validate/async/validators/and.ts.html +154 -0
  33. package/coverage/lcov-report/src/validate/async/validators/index.html +146 -0
  34. package/coverage/lcov-report/src/validate/async/validators/index.ts.html +91 -0
  35. package/coverage/lcov-report/src/validate/async/validators/logical.ts.html +253 -0
  36. package/coverage/lcov-report/src/validate/async/validators/or.ts.html +151 -0
  37. package/coverage/lcov-report/src/validate/async/validators/shape.ts.html +565 -0
  38. package/coverage/lcov-report/src/validate/common/ValidationError.ts.html +184 -0
  39. package/coverage/lcov-report/src/validate/common/index.html +116 -0
  40. package/coverage/lcov-report/src/validate/common/util/defaultErrorMessage.ts.html +163 -0
  41. package/coverage/lcov-report/src/validate/common/util/index.html +161 -0
  42. package/coverage/lcov-report/src/validate/common/util/index.ts.html +94 -0
  43. package/coverage/lcov-report/src/validate/common/util/parseValidator.ts.html +316 -0
  44. package/coverage/lcov-report/src/validate/common/util/parseValidatorInput.ts.html +316 -0
  45. package/coverage/lcov-report/src/validate/common/util/resolveValidationResult.ts.html +277 -0
  46. package/coverage/lcov-report/src/validate/common/util/validatorParser.ts.html +316 -0
  47. package/coverage/lcov-report/src/validate/common/validators/index.html +131 -0
  48. package/coverage/lcov-report/src/validate/common/validators/index.ts.html +88 -0
  49. package/coverage/lcov-report/src/validate/common/validators/type.ts.html +388 -0
  50. package/coverage/lcov-report/src/validate/fmtValidationResult.ts.html +268 -0
  51. package/coverage/lcov-report/src/validate/index.html +116 -0
  52. package/coverage/lcov-report/src/validate/index.ts.html +94 -0
  53. package/coverage/lcov-report/src/validate/makeValidate.ts.html +634 -0
  54. package/coverage/lcov-report/src/validate/specUtil/commonTests.js.html +1324 -0
  55. package/coverage/lcov-report/src/validate/specUtil/index.html +116 -0
  56. package/coverage/lcov-report/src/validate/sync/index.html +131 -0
  57. package/coverage/lcov-report/src/validate/sync/index.ts.html +244 -0
  58. package/coverage/lcov-report/src/validate/sync/parseValidator.ts.html +136 -0
  59. package/coverage/lcov-report/src/validate/sync/validateSyncFn.ts.html +223 -0
  60. package/coverage/lcov-report/src/validate/sync/validators/and.ts.html +148 -0
  61. package/coverage/lcov-report/src/validate/sync/validators/index.html +146 -0
  62. package/coverage/lcov-report/src/validate/sync/validators/index.ts.html +91 -0
  63. package/coverage/lcov-report/src/validate/sync/validators/logical.ts.html +226 -0
  64. package/coverage/lcov-report/src/validate/sync/validators/or.ts.html +130 -0
  65. package/coverage/lcov-report/src/validate/sync/validators/shape.ts.html +523 -0
  66. package/coverage/lcov-report/src/validate/sync/validators/type.ts.html +154 -0
  67. package/coverage/lcov-report/src/validate/syncValidators/and.ts.html +157 -0
  68. package/coverage/lcov-report/src/validate/syncValidators/index.html +176 -0
  69. package/coverage/lcov-report/src/validate/syncValidators/index.ts.html +97 -0
  70. package/coverage/lcov-report/src/validate/syncValidators/or.ts.html +127 -0
  71. package/coverage/lcov-report/src/validate/syncValidators/shape.ts.html +559 -0
  72. package/coverage/lcov-report/src/validate/syncValidators/string.ts.html +163 -0
  73. package/coverage/lcov-report/src/validate/syncValidators/type.ts.html +154 -0
  74. package/coverage/lcov-report/src/validate/util/defaultErrorMessage.ts.html +169 -0
  75. package/coverage/lcov-report/src/validate/util/index.html +146 -0
  76. package/coverage/lcov-report/src/validate/util/index.ts.html +91 -0
  77. package/coverage/lcov-report/src/validate/util/resolveValidationResult.ts.html +253 -0
  78. package/coverage/lcov-report/src/validate/validate.ts.html +220 -0
  79. package/coverage/lcov-report/src/validate/validateAsync.ts.html +220 -0
  80. package/coverage/lcov-report/src/validate/validators/and.ts.html +157 -0
  81. package/coverage/lcov-report/src/validate/validators/index.html +176 -0
  82. package/coverage/lcov-report/src/validate/validators/index.ts.html +97 -0
  83. package/coverage/lcov-report/src/validate/validators/or.ts.html +127 -0
  84. package/coverage/lcov-report/src/validate/validators/shape.ts.html +541 -0
  85. package/coverage/lcov-report/src/validate/validators/type.ts.html +154 -0
  86. package/coverage/lcov-report/src/validate_/ValidationError.ts.html +184 -0
  87. package/coverage/lcov-report/src/validate_/fmtValidationResult.ts.html +268 -0
  88. package/coverage/lcov-report/src/validate_/index.html +161 -0
  89. package/coverage/lcov-report/src/validate_/makeValidate.ts.html +634 -0
  90. package/coverage/lcov-report/src/validate_/validate.ts.html +220 -0
  91. package/coverage/lcov-report/switchValue.ts.html +253 -0
  92. package/coverage/lcov-report/typeOf.ts.html +331 -0
  93. package/coverage/lcov-report/validate.ts.html +757 -0
  94. package/coverage/lcov.info +1045 -74
  95. package/dist/index.mjs +1428 -74
  96. package/jest.config.js +6 -0
  97. package/package.json +27 -27
  98. package/rollup.config.mjs +6 -0
  99. package/src/PromiseLikeEventEmitter/index.ts +35 -0
  100. package/src/array/arrayChunk.ts +7 -0
  101. package/src/array/index.ts +1 -0
  102. package/src/debug/debugFn/index.ts +48 -0
  103. package/src/debug/debugFn/util.ts +27 -0
  104. package/src/debug/deepFreeze.ts +26 -0
  105. package/src/debug/index.ts +3 -0
  106. package/src/debug/wait.ts +14 -0
  107. package/src/index.ts +8 -0
  108. package/src/interpolate/index.spec.ts +20 -0
  109. package/src/interpolate/index.ts +64 -0
  110. package/src/maybeFn.ts +3 -0
  111. package/src/promise/batchFn.spec.ts +92 -0
  112. package/src/promise/batchFn.ts +176 -0
  113. package/src/promise/index.ts +3 -0
  114. package/src/promise/promiseReduce.ts +15 -0
  115. package/src/promise/resolveNestedPromises.spec.ts +205 -0
  116. package/src/promise/resolveNestedPromises.ts +83 -0
  117. package/src/promise/types.ts +2 -0
  118. package/src/switchValue.spec.ts +30 -0
  119. package/src/switchValue.ts +59 -0
  120. package/src/typeOf.spec.ts +47 -0
  121. package/src/typeOf.ts +81 -0
  122. package/src/validate/__snapshots__/index.spec.ts.snap +9 -0
  123. package/src/validate/async/index.spec.ts +236 -0
  124. package/src/validate/async/index.ts +52 -0
  125. package/src/validate/async/validateAsyncFn.ts +41 -0
  126. package/src/validate/async/validators/index.ts +2 -0
  127. package/src/validate/async/validators/logical.ts +56 -0
  128. package/src/validate/async/validators/shape.ts +160 -0
  129. package/src/validate/async/validators/tmpand.ts +24 -0
  130. package/src/validate/async/validators/tmpor.ts +21 -0
  131. package/src/validate/common/ValidationError.ts +33 -0
  132. package/src/validate/common/util/defaultErrorMessage.ts +26 -0
  133. package/src/validate/common/util/index.ts +3 -0
  134. package/src/validate/common/util/parseValidatorInput.ts +77 -0
  135. package/src/validate/common/util/resolveValidationResult.ts +64 -0
  136. package/src/validate/common/validators/index.ts +1 -0
  137. package/src/validate/common/validators/type.ts +101 -0
  138. package/src/validate/index.spec.ts +5 -0
  139. package/src/validate/index.ts +3 -0
  140. package/src/validate/specUtil/commonTests.js +413 -0
  141. package/src/validate/sync/index.spec.ts +81 -0
  142. package/src/validate/sync/index.ts +53 -0
  143. package/src/validate/sync/validateSyncFn.ts +46 -0
  144. package/src/validate/sync/validators/index.ts +2 -0
  145. package/src/validate/sync/validators/logical.ts +47 -0
  146. package/src/validate/sync/validators/shape.ts +146 -0
  147. package/src/validate/types/async.ts +20 -0
  148. package/src/validate/types/common.ts +70 -0
  149. package/src/validate/types/index.ts +3 -0
  150. package/src/validate/types/sync.ts +20 -0
  151. package/tsconfig.json +11 -0
  152. package/array/index.js +0 -11
  153. package/coverage/lcov-report/array/index.html +0 -93
  154. package/coverage/lcov-report/array/index.js.html +0 -98
  155. package/coverage/lcov-report/coverage/coverage-final.json.html +0 -95
  156. package/coverage/lcov-report/coverage/index.html +0 -93
  157. package/coverage/lcov-report/coverage/lcov-report/index.html +0 -106
  158. package/coverage/lcov-report/coverage/lcov-report/prettify.js.html +0 -68
  159. package/coverage/lcov-report/coverage/lcov-report/sorter.js.html +0 -539
  160. package/coverage/lcov-report/fn/index.html +0 -93
  161. package/coverage/lcov-report/fn/index.js.html +0 -215
  162. package/dist/index.js +0 -116
  163. package/fn/index.js +0 -50
@@ -1,98 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <title>Code coverage report for array/index.js</title>
5
- <meta charset="utf-8" />
6
- <link rel="stylesheet" href="../prettify.css" />
7
- <link rel="stylesheet" href="../base.css" />
8
- <meta name="viewport" content="width=device-width, initial-scale=1">
9
- <style type='text/css'>
10
- .coverage-summary .sorter {
11
- background-image: url(../sort-arrow-sprite.png);
12
- }
13
- </style>
14
- </head>
15
- <body>
16
- <div class='wrapper'>
17
- <div class='pad1'>
18
- <h1>
19
- <a href="../index.html">All files</a> / <a href="index.html">array</a> index.js
20
- </h1>
21
- <div class='clearfix'>
22
- <div class='fl pad1y space-right2'>
23
- <span class="strong">100% </span>
24
- <span class="quiet">Statements</span>
25
- <span class='fraction'>5/5</span>
26
- </div>
27
- <div class='fl pad1y space-right2'>
28
- <span class="strong">100% </span>
29
- <span class="quiet">Branches</span>
30
- <span class='fraction'>0/0</span>
31
- </div>
32
- <div class='fl pad1y space-right2'>
33
- <span class="strong">100% </span>
34
- <span class="quiet">Functions</span>
35
- <span class='fraction'>3/3</span>
36
- </div>
37
- <div class='fl pad1y space-right2'>
38
- <span class="strong">100% </span>
39
- <span class="quiet">Lines</span>
40
- <span class='fraction'>5/5</span>
41
- </div>
42
- </div>
43
- </div>
44
- <div class='status-line high'></div>
45
- <pre><table class="coverage">
46
- <tr><td class="line-count quiet">1
47
- 2
48
- 3
49
- 4
50
- 5
51
- 6
52
- 7
53
- 8
54
- 9
55
- 10
56
- 11
57
- 12</td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
58
- <span class="cline-any cline-yes">1x</span>
59
- <span class="cline-any cline-yes">3x</span>
60
- <span class="cline-any cline-yes">3x</span>
61
- <span class="cline-any cline-neutral">&nbsp;</span>
62
- <span class="cline-any cline-neutral">&nbsp;</span>
63
- <span class="cline-any cline-neutral">&nbsp;</span>
64
- <span class="cline-any cline-neutral">&nbsp;</span>
65
- <span class="cline-any cline-yes">1x</span>
66
- <span class="cline-any cline-neutral">&nbsp;</span>
67
- <span class="cline-any cline-neutral">&nbsp;</span>
68
- <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const arrayReduceAsync = (arr, fn, initial) =&gt; {
69
- return arr.reduce((previousPromise, item, index) =&gt; {
70
- return previousPromise.then(acc =&gt; {
71
- return Promise.resolve(fn(acc, item, index, arr))
72
- })
73
- }, Promise.resolve(initial))
74
- }
75
- &nbsp;
76
- module.exports = {
77
- arrayReduceAsync
78
- }
79
- &nbsp;</pre></td></tr>
80
- </table></pre>
81
- <div class='push'></div><!-- for sticky footer -->
82
- </div><!-- /wrapper -->
83
- <div class='footer quiet pad2 space-top1 center small'>
84
- Code coverage
85
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Jun 13 2019 20:54:46 GMT-0300 (-03)
86
- </div>
87
- </div>
88
- <script src="../prettify.js"></script>
89
- <script>
90
- window.onload = function () {
91
- if (typeof prettyPrint === 'function') {
92
- prettyPrint();
93
- }
94
- };
95
- </script>
96
- <script src="../sorter.js"></script>
97
- </body>
98
- </html>