@orioro/util 0.1.0 → 0.3.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/dist/PromiseLikeEventEmitter/index.d.ts +10 -0
- package/dist/array/arrayChunk.d.ts +1 -0
- package/dist/array/index.d.ts +1 -0
- package/dist/debug/debugFn/index.d.ts +15 -0
- package/dist/debug/debugFn/util.d.ts +1 -0
- package/dist/debug/debugFn.d.ts +15 -0
- package/dist/debug/deepFreeze.d.ts +5 -0
- package/dist/debug/index.d.ts +3 -0
- package/dist/debug/wait.d.ts +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.mjs +773 -763
- package/dist/interpolate/index.d.ts +14 -0
- package/dist/maybeFn.d.ts +1 -0
- package/dist/pickPaths/index.d.ts +4 -0
- package/dist/promise/batchFn.d.ts +47 -0
- package/dist/promise/index.d.ts +3 -0
- package/dist/promise/promiseReduce.d.ts +1 -0
- package/dist/promise/resolveNestedPromises.d.ts +14 -0
- package/dist/promise/types.d.ts +2 -0
- package/dist/resolvePaths/index.d.ts +4 -0
- package/dist/switchValue.d.ts +9 -0
- package/dist/typeOf.d.ts +7 -0
- package/dist/validate/async/index.d.ts +18 -0
- package/dist/validate/async/validateAsyncFn.d.ts +2 -0
- package/dist/validate/async/validators/index.d.ts +2 -0
- package/dist/validate/async/validators/logical.d.ts +4 -0
- package/dist/validate/async/validators/shape.d.ts +7 -0
- package/dist/validate/async/validators/tmpand.d.ts +2 -0
- package/dist/validate/async/validators/tmpor.d.ts +2 -0
- package/dist/validate/common/ValidationError.d.ts +11 -0
- package/dist/validate/common/util/defaultErrorMessage.d.ts +2 -0
- package/dist/validate/common/util/index.d.ts +3 -0
- package/dist/validate/common/util/parseValidatorInput.d.ts +5 -0
- package/dist/validate/common/util/resolveValidationResult.d.ts +6 -0
- package/dist/validate/common/validators/index.d.ts +1 -0
- package/dist/validate/common/validators/type.d.ts +9 -0
- package/dist/validate/index.d.ts +3 -0
- package/dist/validate/sync/index.d.ts +18 -0
- package/dist/validate/sync/validateSyncFn.d.ts +2 -0
- package/dist/validate/sync/validators/index.d.ts +2 -0
- package/dist/validate/sync/validators/logical.d.ts +4 -0
- package/dist/validate/sync/validators/shape.d.ts +7 -0
- package/dist/validate/types/async.d.ts +5 -0
- package/dist/validate/types/common.d.ts +27 -0
- package/dist/validate/types/index.d.ts +3 -0
- package/dist/validate/types/sync.d.ts +5 -0
- package/package.json +6 -2
- package/babel.config.cjs +0 -13
- package/coverage/clover.xml +0 -491
- package/coverage/coverage-final.json +0 -29
- package/coverage/lcov-report/ValidationError.ts.html +0 -184
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -296
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/src/debug/deepFreeze.ts.html +0 -157
- package/coverage/lcov-report/src/debug/index.html +0 -146
- package/coverage/lcov-report/src/debug/index.ts.html +0 -91
- package/coverage/lcov-report/src/debug/wait.ts.html +0 -127
- package/coverage/lcov-report/src/index.html +0 -131
- package/coverage/lcov-report/src/interpolate/index.html +0 -116
- package/coverage/lcov-report/src/interpolate/index.ts.html +0 -277
- package/coverage/lcov-report/src/maybeFn.ts.html +0 -94
- package/coverage/lcov-report/src/promise/index.html +0 -146
- package/coverage/lcov-report/src/promise/index.ts.html +0 -91
- package/coverage/lcov-report/src/promise/promiseReduce.ts.html +0 -130
- package/coverage/lcov-report/src/promise/resolveNestedPromises.ts.html +0 -271
- package/coverage/lcov-report/src/switchValue.ts.html +0 -253
- package/coverage/lcov-report/src/typeOf.ts.html +0 -328
- package/coverage/lcov-report/src/validate/ValidationError.ts.html +0 -184
- package/coverage/lcov-report/src/validate/async/index.html +0 -131
- package/coverage/lcov-report/src/validate/async/index.ts.html +0 -241
- package/coverage/lcov-report/src/validate/async/parseValidator.ts.html +0 -136
- package/coverage/lcov-report/src/validate/async/validateAsyncFn.ts.html +0 -208
- package/coverage/lcov-report/src/validate/async/validators/and.ts.html +0 -154
- package/coverage/lcov-report/src/validate/async/validators/index.html +0 -146
- package/coverage/lcov-report/src/validate/async/validators/index.ts.html +0 -91
- package/coverage/lcov-report/src/validate/async/validators/logical.ts.html +0 -253
- package/coverage/lcov-report/src/validate/async/validators/or.ts.html +0 -151
- package/coverage/lcov-report/src/validate/async/validators/shape.ts.html +0 -565
- package/coverage/lcov-report/src/validate/common/ValidationError.ts.html +0 -184
- package/coverage/lcov-report/src/validate/common/index.html +0 -116
- package/coverage/lcov-report/src/validate/common/util/defaultErrorMessage.ts.html +0 -163
- package/coverage/lcov-report/src/validate/common/util/index.html +0 -161
- package/coverage/lcov-report/src/validate/common/util/index.ts.html +0 -94
- package/coverage/lcov-report/src/validate/common/util/parseValidator.ts.html +0 -316
- package/coverage/lcov-report/src/validate/common/util/parseValidatorInput.ts.html +0 -316
- package/coverage/lcov-report/src/validate/common/util/resolveValidationResult.ts.html +0 -277
- package/coverage/lcov-report/src/validate/common/util/validatorParser.ts.html +0 -316
- package/coverage/lcov-report/src/validate/common/validators/index.html +0 -131
- package/coverage/lcov-report/src/validate/common/validators/index.ts.html +0 -88
- package/coverage/lcov-report/src/validate/common/validators/type.ts.html +0 -388
- package/coverage/lcov-report/src/validate/fmtValidationResult.ts.html +0 -268
- package/coverage/lcov-report/src/validate/index.html +0 -116
- package/coverage/lcov-report/src/validate/index.ts.html +0 -94
- package/coverage/lcov-report/src/validate/makeValidate.ts.html +0 -634
- package/coverage/lcov-report/src/validate/specUtil/commonTests.js.html +0 -1324
- package/coverage/lcov-report/src/validate/specUtil/index.html +0 -116
- package/coverage/lcov-report/src/validate/sync/index.html +0 -131
- package/coverage/lcov-report/src/validate/sync/index.ts.html +0 -244
- package/coverage/lcov-report/src/validate/sync/parseValidator.ts.html +0 -136
- package/coverage/lcov-report/src/validate/sync/validateSyncFn.ts.html +0 -223
- package/coverage/lcov-report/src/validate/sync/validators/and.ts.html +0 -148
- package/coverage/lcov-report/src/validate/sync/validators/index.html +0 -146
- package/coverage/lcov-report/src/validate/sync/validators/index.ts.html +0 -91
- package/coverage/lcov-report/src/validate/sync/validators/logical.ts.html +0 -226
- package/coverage/lcov-report/src/validate/sync/validators/or.ts.html +0 -130
- package/coverage/lcov-report/src/validate/sync/validators/shape.ts.html +0 -523
- package/coverage/lcov-report/src/validate/sync/validators/type.ts.html +0 -154
- package/coverage/lcov-report/src/validate/syncValidators/and.ts.html +0 -157
- package/coverage/lcov-report/src/validate/syncValidators/index.html +0 -176
- package/coverage/lcov-report/src/validate/syncValidators/index.ts.html +0 -97
- package/coverage/lcov-report/src/validate/syncValidators/or.ts.html +0 -127
- package/coverage/lcov-report/src/validate/syncValidators/shape.ts.html +0 -559
- package/coverage/lcov-report/src/validate/syncValidators/string.ts.html +0 -163
- package/coverage/lcov-report/src/validate/syncValidators/type.ts.html +0 -154
- package/coverage/lcov-report/src/validate/util/defaultErrorMessage.ts.html +0 -169
- package/coverage/lcov-report/src/validate/util/index.html +0 -146
- package/coverage/lcov-report/src/validate/util/index.ts.html +0 -91
- package/coverage/lcov-report/src/validate/util/resolveValidationResult.ts.html +0 -253
- package/coverage/lcov-report/src/validate/validate.ts.html +0 -220
- package/coverage/lcov-report/src/validate/validateAsync.ts.html +0 -220
- package/coverage/lcov-report/src/validate/validators/and.ts.html +0 -157
- package/coverage/lcov-report/src/validate/validators/index.html +0 -176
- package/coverage/lcov-report/src/validate/validators/index.ts.html +0 -97
- package/coverage/lcov-report/src/validate/validators/or.ts.html +0 -127
- package/coverage/lcov-report/src/validate/validators/shape.ts.html +0 -541
- package/coverage/lcov-report/src/validate/validators/type.ts.html +0 -154
- package/coverage/lcov-report/src/validate_/ValidationError.ts.html +0 -184
- package/coverage/lcov-report/src/validate_/fmtValidationResult.ts.html +0 -268
- package/coverage/lcov-report/src/validate_/index.html +0 -161
- package/coverage/lcov-report/src/validate_/makeValidate.ts.html +0 -634
- package/coverage/lcov-report/src/validate_/validate.ts.html +0 -220
- package/coverage/lcov-report/switchValue.ts.html +0 -253
- package/coverage/lcov-report/typeOf.ts.html +0 -331
- package/coverage/lcov-report/validate.ts.html +0 -757
- package/coverage/lcov.info +0 -1056
- package/jest.config.js +0 -6
- package/rollup.config.mjs +0 -6
- package/src/PromiseLikeEventEmitter/index.ts +0 -35
- package/src/array/arrayChunk.ts +0 -7
- package/src/array/index.ts +0 -1
- package/src/debug/debugFn/index.ts +0 -48
- package/src/debug/debugFn/util.ts +0 -27
- package/src/debug/deepFreeze.ts +0 -26
- package/src/debug/index.ts +0 -3
- package/src/debug/wait.ts +0 -14
- package/src/index.ts +0 -8
- package/src/interpolate/index.spec.ts +0 -20
- package/src/interpolate/index.ts +0 -64
- package/src/maybeFn.ts +0 -3
- package/src/promise/batchFn.spec.ts +0 -92
- package/src/promise/batchFn.ts +0 -176
- package/src/promise/index.ts +0 -3
- package/src/promise/promiseReduce.ts +0 -15
- package/src/promise/resolveNestedPromises.spec.ts +0 -205
- package/src/promise/resolveNestedPromises.ts +0 -83
- package/src/promise/types.ts +0 -2
- package/src/switchValue.spec.ts +0 -30
- package/src/switchValue.ts +0 -59
- package/src/typeOf.spec.ts +0 -47
- package/src/typeOf.ts +0 -81
- package/src/validate/__snapshots__/index.spec.ts.snap +0 -9
- package/src/validate/async/index.spec.ts +0 -236
- package/src/validate/async/index.ts +0 -52
- package/src/validate/async/validateAsyncFn.ts +0 -41
- package/src/validate/async/validators/index.ts +0 -2
- package/src/validate/async/validators/logical.ts +0 -56
- package/src/validate/async/validators/shape.ts +0 -160
- package/src/validate/async/validators/tmpand.ts +0 -24
- package/src/validate/async/validators/tmpor.ts +0 -21
- package/src/validate/common/ValidationError.ts +0 -33
- package/src/validate/common/util/defaultErrorMessage.ts +0 -26
- package/src/validate/common/util/index.ts +0 -3
- package/src/validate/common/util/parseValidatorInput.ts +0 -77
- package/src/validate/common/util/resolveValidationResult.ts +0 -64
- package/src/validate/common/validators/index.ts +0 -1
- package/src/validate/common/validators/type.ts +0 -101
- package/src/validate/index.spec.ts +0 -5
- package/src/validate/index.ts +0 -3
- package/src/validate/specUtil/commonTests.js +0 -413
- package/src/validate/sync/index.spec.ts +0 -81
- package/src/validate/sync/index.ts +0 -53
- package/src/validate/sync/validateSyncFn.ts +0 -46
- package/src/validate/sync/validators/index.ts +0 -2
- package/src/validate/sync/validators/logical.ts +0 -47
- package/src/validate/sync/validators/shape.ts +0 -146
- package/src/validate/types/async.ts +0 -20
- package/src/validate/types/common.ts +0 -70
- package/src/validate/types/index.ts +0 -3
- package/src/validate/types/sync.ts +0 -20
- package/tsconfig.json +0 -11
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
|
|
5
|
-
<head>
|
|
6
|
-
<title>Code coverage report for src/validate/syncValidators/or.ts</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="../../../prettify.css" />
|
|
9
|
-
<link rel="stylesheet" href="../../../base.css" />
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<style type='text/css'>
|
|
13
|
-
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(../../../sort-arrow-sprite.png);
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div class='wrapper'>
|
|
21
|
-
<div class='pad1'>
|
|
22
|
-
<h1><a href="../../../index.html">All files</a> / <a href="index.html">src/validate/syncValidators</a> or.ts</h1>
|
|
23
|
-
<div class='clearfix'>
|
|
24
|
-
|
|
25
|
-
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">0% </span>
|
|
27
|
-
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/4</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">100% </span>
|
|
34
|
-
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/0</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">0% </span>
|
|
41
|
-
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/3</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">0% </span>
|
|
48
|
-
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/4</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
<p class="quiet">
|
|
55
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
-
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
|
-
</div>
|
|
64
|
-
<div class='status-line low'></div>
|
|
65
|
-
<pre><table class="coverage">
|
|
66
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
-
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
-
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
-
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
-
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
-
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
-
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
-
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
-
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
-
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
-
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
-
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
-
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
-
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
-
<a name='L15'></a><a href='#L15'>15</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
81
|
-
<span class="cline-any cline-neutral"> </span>
|
|
82
|
-
<span class="cline-any cline-neutral"> </span>
|
|
83
|
-
<span class="cline-any cline-neutral"> </span>
|
|
84
|
-
<span class="cline-any cline-neutral"> </span>
|
|
85
|
-
<span class="cline-any cline-neutral"> </span>
|
|
86
|
-
<span class="cline-any cline-no"> </span>
|
|
87
|
-
<span class="cline-any cline-no"> </span>
|
|
88
|
-
<span class="cline-any cline-no"> </span>
|
|
89
|
-
<span class="cline-any cline-neutral"> </span>
|
|
90
|
-
<span class="cline-any cline-neutral"> </span>
|
|
91
|
-
<span class="cline-any cline-no"> </span>
|
|
92
|
-
<span class="cline-any cline-neutral"> </span>
|
|
93
|
-
<span class="cline-any cline-neutral"> </span>
|
|
94
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { SyncValidateFn, SyncValidatorFn } from '../types'
|
|
95
|
-
|
|
96
|
-
//
|
|
97
|
-
// Or operator (serial)
|
|
98
|
-
//
|
|
99
|
-
export function <span class="fstat-no" title="function not covered" >or(</span>validators: SyncValidatorFn[]) {
|
|
100
|
-
<span class="cstat-no" title="statement not covered" > return function <span class="fstat-no" title="function not covered" >validateOr(</span>input: any, validate: SyncValidateFn) {</span>
|
|
101
|
-
const someIsValid = <span class="cstat-no" title="statement not covered" >validators.some(</span>
|
|
102
|
-
<span class="fstat-no" title="function not covered" > (v</span>alidator) => <span class="cstat-no" title="statement not covered" >validate(validator, input) === true,</span>
|
|
103
|
-
)
|
|
104
|
-
|
|
105
|
-
<span class="cstat-no" title="statement not covered" > return someIsValid</span>
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
</pre></td></tr></table></pre>
|
|
109
|
-
|
|
110
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
111
|
-
</div><!-- /wrapper -->
|
|
112
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
113
|
-
Code coverage generated by
|
|
114
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
115
|
-
at 2024-05-02T03:09:53.528Z
|
|
116
|
-
</div>
|
|
117
|
-
<script src="../../../prettify.js"></script>
|
|
118
|
-
<script>
|
|
119
|
-
window.onload = function () {
|
|
120
|
-
prettyPrint();
|
|
121
|
-
};
|
|
122
|
-
</script>
|
|
123
|
-
<script src="../../../sorter.js"></script>
|
|
124
|
-
<script src="../../../block-navigation.js"></script>
|
|
125
|
-
</body>
|
|
126
|
-
</html>
|
|
127
|
-
|