@orioro/util 0.0.0 → 0.2.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.
- package/README.md +1 -0
- package/babel.config.cjs +13 -0
- package/coverage/clover.xml +488 -45
- package/coverage/coverage-final.json +28 -2
- package/coverage/lcov-report/ValidationError.ts.html +184 -0
- package/coverage/lcov-report/base.css +19 -7
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +248 -58
- package/coverage/lcov-report/prettify.js +1 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +52 -14
- package/coverage/lcov-report/src/debug/deepFreeze.ts.html +157 -0
- package/coverage/lcov-report/src/debug/index.html +146 -0
- package/coverage/lcov-report/src/debug/index.ts.html +91 -0
- package/coverage/lcov-report/src/debug/wait.ts.html +127 -0
- package/coverage/lcov-report/src/index.html +131 -0
- package/coverage/lcov-report/src/interpolate/index.html +116 -0
- package/coverage/lcov-report/src/interpolate/index.ts.html +277 -0
- package/coverage/lcov-report/src/maybeFn.ts.html +94 -0
- package/coverage/lcov-report/src/promise/index.html +146 -0
- package/coverage/lcov-report/src/promise/index.ts.html +91 -0
- package/coverage/lcov-report/src/promise/promiseReduce.ts.html +130 -0
- package/coverage/lcov-report/src/promise/resolveNestedPromises.ts.html +271 -0
- package/coverage/lcov-report/src/switchValue.ts.html +253 -0
- package/coverage/lcov-report/src/typeOf.ts.html +328 -0
- package/coverage/lcov-report/src/validate/ValidationError.ts.html +184 -0
- package/coverage/lcov-report/src/validate/async/index.html +131 -0
- package/coverage/lcov-report/src/validate/async/index.ts.html +241 -0
- package/coverage/lcov-report/src/validate/async/parseValidator.ts.html +136 -0
- package/coverage/lcov-report/src/validate/async/validateAsyncFn.ts.html +208 -0
- package/coverage/lcov-report/src/validate/async/validators/and.ts.html +154 -0
- package/coverage/lcov-report/src/validate/async/validators/index.html +146 -0
- package/coverage/lcov-report/src/validate/async/validators/index.ts.html +91 -0
- package/coverage/lcov-report/src/validate/async/validators/logical.ts.html +253 -0
- package/coverage/lcov-report/src/validate/async/validators/or.ts.html +151 -0
- package/coverage/lcov-report/src/validate/async/validators/shape.ts.html +565 -0
- package/coverage/lcov-report/src/validate/common/ValidationError.ts.html +184 -0
- package/coverage/lcov-report/src/validate/common/index.html +116 -0
- package/coverage/lcov-report/src/validate/common/util/defaultErrorMessage.ts.html +163 -0
- package/coverage/lcov-report/src/validate/common/util/index.html +161 -0
- package/coverage/lcov-report/src/validate/common/util/index.ts.html +94 -0
- package/coverage/lcov-report/src/validate/common/util/parseValidator.ts.html +316 -0
- package/coverage/lcov-report/src/validate/common/util/parseValidatorInput.ts.html +316 -0
- package/coverage/lcov-report/src/validate/common/util/resolveValidationResult.ts.html +277 -0
- package/coverage/lcov-report/src/validate/common/util/validatorParser.ts.html +316 -0
- package/coverage/lcov-report/src/validate/common/validators/index.html +131 -0
- package/coverage/lcov-report/src/validate/common/validators/index.ts.html +88 -0
- package/coverage/lcov-report/src/validate/common/validators/type.ts.html +388 -0
- package/coverage/lcov-report/src/validate/fmtValidationResult.ts.html +268 -0
- package/coverage/lcov-report/src/validate/index.html +116 -0
- package/coverage/lcov-report/src/validate/index.ts.html +94 -0
- package/coverage/lcov-report/src/validate/makeValidate.ts.html +634 -0
- package/coverage/lcov-report/src/validate/specUtil/commonTests.js.html +1324 -0
- package/coverage/lcov-report/src/validate/specUtil/index.html +116 -0
- package/coverage/lcov-report/src/validate/sync/index.html +131 -0
- package/coverage/lcov-report/src/validate/sync/index.ts.html +244 -0
- package/coverage/lcov-report/src/validate/sync/parseValidator.ts.html +136 -0
- package/coverage/lcov-report/src/validate/sync/validateSyncFn.ts.html +223 -0
- package/coverage/lcov-report/src/validate/sync/validators/and.ts.html +148 -0
- package/coverage/lcov-report/src/validate/sync/validators/index.html +146 -0
- package/coverage/lcov-report/src/validate/sync/validators/index.ts.html +91 -0
- package/coverage/lcov-report/src/validate/sync/validators/logical.ts.html +226 -0
- package/coverage/lcov-report/src/validate/sync/validators/or.ts.html +130 -0
- package/coverage/lcov-report/src/validate/sync/validators/shape.ts.html +523 -0
- package/coverage/lcov-report/src/validate/sync/validators/type.ts.html +154 -0
- package/coverage/lcov-report/src/validate/syncValidators/and.ts.html +157 -0
- package/coverage/lcov-report/src/validate/syncValidators/index.html +176 -0
- package/coverage/lcov-report/src/validate/syncValidators/index.ts.html +97 -0
- package/coverage/lcov-report/src/validate/syncValidators/or.ts.html +127 -0
- package/coverage/lcov-report/src/validate/syncValidators/shape.ts.html +559 -0
- package/coverage/lcov-report/src/validate/syncValidators/string.ts.html +163 -0
- package/coverage/lcov-report/src/validate/syncValidators/type.ts.html +154 -0
- package/coverage/lcov-report/src/validate/util/defaultErrorMessage.ts.html +169 -0
- package/coverage/lcov-report/src/validate/util/index.html +146 -0
- package/coverage/lcov-report/src/validate/util/index.ts.html +91 -0
- package/coverage/lcov-report/src/validate/util/resolveValidationResult.ts.html +253 -0
- package/coverage/lcov-report/src/validate/validate.ts.html +220 -0
- package/coverage/lcov-report/src/validate/validateAsync.ts.html +220 -0
- package/coverage/lcov-report/src/validate/validators/and.ts.html +157 -0
- package/coverage/lcov-report/src/validate/validators/index.html +176 -0
- package/coverage/lcov-report/src/validate/validators/index.ts.html +97 -0
- package/coverage/lcov-report/src/validate/validators/or.ts.html +127 -0
- package/coverage/lcov-report/src/validate/validators/shape.ts.html +541 -0
- package/coverage/lcov-report/src/validate/validators/type.ts.html +154 -0
- package/coverage/lcov-report/src/validate_/ValidationError.ts.html +184 -0
- package/coverage/lcov-report/src/validate_/fmtValidationResult.ts.html +268 -0
- package/coverage/lcov-report/src/validate_/index.html +161 -0
- package/coverage/lcov-report/src/validate_/makeValidate.ts.html +634 -0
- package/coverage/lcov-report/src/validate_/validate.ts.html +220 -0
- package/coverage/lcov-report/switchValue.ts.html +253 -0
- package/coverage/lcov-report/typeOf.ts.html +331 -0
- package/coverage/lcov-report/validate.ts.html +757 -0
- package/coverage/lcov.info +1045 -74
- package/dist/index.mjs +1437 -73
- package/jest.config.js +6 -0
- package/package.json +27 -27
- package/rollup.config.mjs +6 -0
- package/src/PromiseLikeEventEmitter/index.ts +35 -0
- package/src/array/arrayChunk.ts +7 -0
- package/src/array/index.ts +1 -0
- package/src/debug/debugFn/index.ts +48 -0
- package/src/debug/debugFn/util.ts +27 -0
- package/src/debug/deepFreeze.ts +26 -0
- package/src/debug/index.ts +3 -0
- package/src/debug/wait.ts +14 -0
- package/src/index.ts +9 -0
- package/src/interpolate/index.spec.ts +20 -0
- package/src/interpolate/index.ts +64 -0
- package/src/maybeFn.ts +3 -0
- package/src/promise/batchFn.spec.ts +92 -0
- package/src/promise/batchFn.ts +176 -0
- package/src/promise/index.ts +3 -0
- package/src/promise/promiseReduce.ts +15 -0
- package/src/promise/resolveNestedPromises.spec.ts +205 -0
- package/src/promise/resolveNestedPromises.ts +83 -0
- package/src/promise/types.ts +2 -0
- package/src/resolvePaths/index.spec.ts +42 -0
- package/src/resolvePaths/index.ts +21 -0
- package/src/switchValue.spec.ts +30 -0
- package/src/switchValue.ts +59 -0
- package/src/typeOf.spec.ts +47 -0
- package/src/typeOf.ts +81 -0
- package/src/validate/__snapshots__/index.spec.ts.snap +9 -0
- package/src/validate/async/index.spec.ts +236 -0
- package/src/validate/async/index.ts +52 -0
- package/src/validate/async/validateAsyncFn.ts +41 -0
- package/src/validate/async/validators/index.ts +2 -0
- package/src/validate/async/validators/logical.ts +56 -0
- package/src/validate/async/validators/shape.ts +160 -0
- package/src/validate/async/validators/tmpand.ts +24 -0
- package/src/validate/async/validators/tmpor.ts +21 -0
- package/src/validate/common/ValidationError.ts +33 -0
- package/src/validate/common/util/defaultErrorMessage.ts +26 -0
- package/src/validate/common/util/index.ts +3 -0
- package/src/validate/common/util/parseValidatorInput.ts +77 -0
- package/src/validate/common/util/resolveValidationResult.ts +64 -0
- package/src/validate/common/validators/index.ts +1 -0
- package/src/validate/common/validators/type.ts +101 -0
- package/src/validate/index.spec.ts +5 -0
- package/src/validate/index.ts +3 -0
- package/src/validate/specUtil/commonTests.js +413 -0
- package/src/validate/sync/index.spec.ts +81 -0
- package/src/validate/sync/index.ts +53 -0
- package/src/validate/sync/validateSyncFn.ts +46 -0
- package/src/validate/sync/validators/index.ts +2 -0
- package/src/validate/sync/validators/logical.ts +47 -0
- package/src/validate/sync/validators/shape.ts +146 -0
- package/src/validate/types/async.ts +20 -0
- package/src/validate/types/common.ts +70 -0
- package/src/validate/types/index.ts +3 -0
- package/src/validate/types/sync.ts +20 -0
- package/tsconfig.json +11 -0
- package/array/index.js +0 -11
- package/coverage/lcov-report/array/index.html +0 -93
- package/coverage/lcov-report/array/index.js.html +0 -98
- package/coverage/lcov-report/coverage/coverage-final.json.html +0 -95
- package/coverage/lcov-report/coverage/index.html +0 -93
- package/coverage/lcov-report/coverage/lcov-report/index.html +0 -106
- package/coverage/lcov-report/coverage/lcov-report/prettify.js.html +0 -68
- package/coverage/lcov-report/coverage/lcov-report/sorter.js.html +0 -539
- package/coverage/lcov-report/fn/index.html +0 -93
- package/coverage/lcov-report/fn/index.js.html +0 -215
- package/dist/index.js +0 -116
- 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"> </span>
|
|
62
|
-
<span class="cline-any cline-neutral"> </span>
|
|
63
|
-
<span class="cline-any cline-neutral"> </span>
|
|
64
|
-
<span class="cline-any cline-neutral"> </span>
|
|
65
|
-
<span class="cline-any cline-yes">1x</span>
|
|
66
|
-
<span class="cline-any cline-neutral"> </span>
|
|
67
|
-
<span class="cline-any cline-neutral"> </span>
|
|
68
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const arrayReduceAsync = (arr, fn, initial) => {
|
|
69
|
-
return arr.reduce((previousPromise, item, index) => {
|
|
70
|
-
return previousPromise.then(acc => {
|
|
71
|
-
return Promise.resolve(fn(acc, item, index, arr))
|
|
72
|
-
})
|
|
73
|
-
}, Promise.resolve(initial))
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
module.exports = {
|
|
77
|
-
arrayReduceAsync
|
|
78
|
-
}
|
|
79
|
-
</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>
|