xdbc 1.0.208 → 1.0.209

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 (75) hide show
  1. package/Assessment.html +350 -0
  2. package/Assessment.md +507 -51
  3. package/CHANGELOG.md +55 -0
  4. package/CONTRIBUTING.md +129 -17
  5. package/README.md +373 -71
  6. package/SECURITY.md +60 -18
  7. package/SUPPORT.md +65 -0
  8. package/__tests__/DBC/DEFINED.test.ts +53 -0
  9. package/__tests__/DBC/Decorators.test.ts +365 -0
  10. package/__tests__/DBC/GREATER.test.ts +8 -6
  11. package/__tests__/DBC/HasAttribute.test.ts +56 -0
  12. package/__tests__/DBC/IF.test.ts +52 -0
  13. package/__tests__/DBC/JSON.Parse.test.ts +1 -1
  14. package/__tests__/DBC/OR.test.ts +1 -1
  15. package/__tests__/DBC/REGEX.test.ts +1 -1
  16. package/__tests__/DBC/TYPE.test.ts +1 -1
  17. package/__tests__/DBC/UNDEFINED.test.ts +45 -0
  18. package/__tests__/DBC/ZOD.test.ts +54 -0
  19. package/jest.config.js +21 -0
  20. package/package.json +4 -5
  21. package/src/DBC/AE.ts +10 -6
  22. package/src/DBC/COMPARISON/GREATER.ts +11 -7
  23. package/src/DBC/COMPARISON/GREATER_OR_EQUAL.ts +14 -10
  24. package/src/DBC/COMPARISON/LESS.ts +14 -10
  25. package/src/DBC/COMPARISON/LESS_OR_EQUAL.ts +14 -10
  26. package/src/DBC/COMPARISON.ts +20 -43
  27. package/src/DBC/DEFINED.ts +4 -23
  28. package/src/DBC/EQ/DIFFERENT.ts +21 -56
  29. package/src/DBC/EQ.ts +7 -26
  30. package/src/DBC/HasAttribute.ts +9 -26
  31. package/src/DBC/IF.ts +8 -27
  32. package/src/DBC/INSTANCE.ts +5 -22
  33. package/src/DBC/JSON.OP.ts +4 -34
  34. package/src/DBC/JSON.Parse.ts +5 -25
  35. package/src/DBC/OR.ts +5 -14
  36. package/src/DBC/REGEX.ts +41 -40
  37. package/src/DBC/TYPE.ts +6 -25
  38. package/src/DBC/UNDEFINED.ts +3 -22
  39. package/src/DBC/ZOD.ts +10 -27
  40. package/src/DBC.ts +211 -42
  41. package/tsconfig.json +7 -4
  42. package/tsconfig.test.json +12 -0
  43. package/.parcel-cache/bf96c58b6061a62a-BundleGraph +0 -0
  44. package/.parcel-cache/d7c812d65aeeac59-AssetGraph +0 -0
  45. package/.parcel-cache/data.mdb +0 -0
  46. package/.parcel-cache/e81759c1f106a17f-RequestGraph +0 -0
  47. package/.parcel-cache/fe0db3c4eb428be2-AssetGraph +0 -0
  48. package/.parcel-cache/lock.mdb +0 -0
  49. package/.parcel-cache/snapshot-e81759c1f106a17f.txt +0 -4609
  50. package/dist/DBC/AE.js +0 -173
  51. package/dist/DBC/COMPARISON/GREATER.js +0 -21
  52. package/dist/DBC/COMPARISON/GREATER_OR_EQUAL.js +0 -21
  53. package/dist/DBC/COMPARISON/LESS.js +0 -21
  54. package/dist/DBC/COMPARISON/LESS_OR_EQUAL.js +0 -21
  55. package/dist/DBC/COMPARISON.js +0 -99
  56. package/dist/DBC/DEFINED.js +0 -99
  57. package/dist/DBC/EQ/DIFFERENT.js +0 -21
  58. package/dist/DBC/EQ.js +0 -100
  59. package/dist/DBC/GREATER.js +0 -99
  60. package/dist/DBC/HasAttribute.js +0 -108
  61. package/dist/DBC/IF.js +0 -99
  62. package/dist/DBC/INSTANCE.js +0 -93
  63. package/dist/DBC/JSON.OP.js +0 -133
  64. package/dist/DBC/JSON.Parse.js +0 -114
  65. package/dist/DBC/OR.js +0 -113
  66. package/dist/DBC/REGEX.js +0 -110
  67. package/dist/DBC/TYPE.js +0 -87
  68. package/dist/DBC/ZOD.js +0 -114
  69. package/dist/DBC.js +0 -336
  70. package/dist/Demo.js +0 -290
  71. package/dist/Test.html +0 -18
  72. package/dist/bundle.js +0 -2075
  73. package/dist/index.html +0 -18
  74. package/jest.config.ts +0 -20
  75. package/xpackage-lock.json +0 -122
@@ -0,0 +1,350 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>XDBC — Code Quality Assessment</title>
7
+ <style>
8
+ :root {
9
+ --bg: #0d1117;
10
+ --surface: #161b22;
11
+ --border: #30363d;
12
+ --text: #e6edf3;
13
+ --text-muted: #8b949e;
14
+ --accent: #58a6ff;
15
+ --green: #3fb950;
16
+ --yellow: #d29922;
17
+ --red: #f85149;
18
+ --orange: #db6d28;
19
+ }
20
+ * { margin: 0; padding: 0; box-sizing: border-box; }
21
+ body {
22
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
23
+ background: var(--bg);
24
+ color: var(--text);
25
+ line-height: 1.6;
26
+ padding: 2rem;
27
+ max-width: 960px;
28
+ margin: 0 auto;
29
+ }
30
+ h1 { font-size: 2rem; margin-bottom: .25rem; }
31
+ h2 {
32
+ font-size: 1.4rem;
33
+ margin-top: 2.5rem;
34
+ margin-bottom: 1rem;
35
+ padding-bottom: .4rem;
36
+ border-bottom: 1px solid var(--border);
37
+ }
38
+ h3 { font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: .5rem; }
39
+ .meta { color: var(--text-muted); font-size: .9rem; margin-bottom: 2rem; }
40
+ .meta span { margin-right: 1.5rem; }
41
+ p, li { margin-bottom: .5rem; }
42
+ ul { padding-left: 1.5rem; }
43
+ code {
44
+ background: var(--surface);
45
+ padding: .15em .4em;
46
+ border-radius: 4px;
47
+ font-size: .9em;
48
+ font-family: 'Cascadia Code', 'Fira Code', Consolas, monospace;
49
+ }
50
+ a { color: var(--accent); text-decoration: none; }
51
+ a:hover { text-decoration: underline; }
52
+ table {
53
+ width: 100%;
54
+ border-collapse: collapse;
55
+ margin: 1rem 0;
56
+ font-size: .92rem;
57
+ }
58
+ th, td {
59
+ text-align: left;
60
+ padding: .55rem .75rem;
61
+ border: 1px solid var(--border);
62
+ }
63
+ th { background: var(--surface); color: var(--text-muted); font-weight: 600; }
64
+ tr:nth-child(even) td { background: rgba(22, 27, 34, .5); }
65
+
66
+ /* Score pills */
67
+ .score-grid {
68
+ display: grid;
69
+ grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
70
+ gap: .75rem;
71
+ margin: 1.5rem 0;
72
+ }
73
+ .score-card {
74
+ background: var(--surface);
75
+ border: 1px solid var(--border);
76
+ border-radius: 8px;
77
+ padding: 1rem 1.2rem;
78
+ display: flex;
79
+ justify-content: space-between;
80
+ align-items: center;
81
+ }
82
+ .score-card .label { font-weight: 500; }
83
+ .score-card .pill {
84
+ font-size: .85rem;
85
+ font-weight: 700;
86
+ padding: .25rem .7rem;
87
+ border-radius: 20px;
88
+ min-width: 3.2rem;
89
+ text-align: center;
90
+ }
91
+ .pill.green { background: rgba(63,185,80,.15); color: var(--green); }
92
+ .pill.yellow { background: rgba(210,153,34,.15); color: var(--yellow); }
93
+
94
+ /* Summary box */
95
+ .summary {
96
+ background: var(--surface);
97
+ border: 1px solid var(--border);
98
+ border-radius: 8px;
99
+ padding: 1.5rem;
100
+ margin: 1.5rem 0;
101
+ font-size: .95rem;
102
+ }
103
+
104
+ /* Section numbering */
105
+ .section-num {
106
+ color: var(--accent);
107
+ margin-right: .4rem;
108
+ }
109
+
110
+ /* Status badges */
111
+ .badge {
112
+ display: inline-block;
113
+ font-size: .8rem;
114
+ font-weight: 600;
115
+ padding: .15rem .55rem;
116
+ border-radius: 12px;
117
+ vertical-align: middle;
118
+ }
119
+ .badge-pass { background: rgba(63,185,80,.15); color: var(--green); }
120
+ .badge-warn { background: rgba(210,153,34,.15); color: var(--yellow); }
121
+ .badge-info { background: rgba(88,166,255,.15); color: var(--accent); }
122
+
123
+ /* Recommendation priority */
124
+ .priority-med { color: var(--yellow); }
125
+ .priority-low { color: var(--text-muted); }
126
+
127
+ @media (max-width: 600px) {
128
+ body { padding: 1rem; }
129
+ .score-grid { grid-template-columns: 1fr; }
130
+ }
131
+ </style>
132
+ </head>
133
+ <body>
134
+
135
+ <h1>XDBC — Code Quality Assessment</h1>
136
+ <div class="meta">
137
+ <span>Date: April 13, 2026</span>
138
+ <span>Version: 1.0.208</span>
139
+ <span>Scope: 21 source files · 3,451 LOC · 15 test suites · 119 tests</span>
140
+ </div>
141
+
142
+ <div class="summary">
143
+ XDBC is a production-ready TypeScript Design by Contract framework built on the decorator pattern.
144
+ It provides 16 contract types — from basic equality and type checks to Zod schema validation and conditional contracts —
145
+ all surfaced as ergonomic <code>@PRE</code>, <code>@POST</code>, and <code>@INVARIANT</code> decorators.
146
+ The codebase is clean, well-documented, zero-warning, fully tested, and secured against common attack vectors.
147
+ </div>
148
+
149
+ <!-- Scores -->
150
+ <div class="score-grid">
151
+ <div class="score-card"><span class="label">Architecture</span><span class="pill green">9 / 10</span></div>
152
+ <div class="score-card"><span class="label">Code Quality</span><span class="pill green">9 / 10</span></div>
153
+ <div class="score-card"><span class="label">Test Coverage</span><span class="pill green">9 / 10</span></div>
154
+ <div class="score-card"><span class="label">Security</span><span class="pill green">9.5 / 10</span></div>
155
+ <div class="score-card"><span class="label">Performance</span><span class="pill green">8 / 10</span></div>
156
+ <div class="score-card"><span class="label">Maintainability</span><span class="pill green">9 / 10</span></div>
157
+ <div class="score-card"><span class="label overall" style="font-size:1.1rem">Overall</span><span class="pill green" style="font-size:1rem">9 / 10</span></div>
158
+ </div>
159
+
160
+ <!-- 1. Architecture -->
161
+ <h2><span class="section-num">1.</span> Architecture</h2>
162
+ <p>
163
+ XDBC follows a single-inheritance hierarchy: <code>DBC</code> is the base class providing the decorator infrastructure,
164
+ and 16 contract classes extend it. Each contract class exposes three static decorator factories
165
+ (<code>PRE</code>, <code>POST</code>, <code>INVARIANT</code>), a static <code>checkAlgorithm()</code>,
166
+ and an instance <code>check()</code> method.
167
+ </p>
168
+
169
+ <h3>Strengths</h3>
170
+ <ul>
171
+ <li><strong>Factory helpers</strong> (<code>createPRE</code>, <code>createPOST</code>, <code>createINVARIANT</code>) centralize decorator wiring, eliminating ~200 lines of duplicated boilerplate</li>
172
+ <li><strong>Decoupled instances</strong> — <code>DBC.register()</code> separates construction from global mounting; <code>DBC.isolated()</code> enables test isolation; <code>getDBC()</code> accepts <code>string | DBC</code></li>
173
+ <li><strong>Composability</strong> — AE accepts any <code>{ check(toCheck) }</code> object, enabling contract chaining</li>
174
+ <li><strong>Path resolution</strong> — Dot notation, array indices, method calls, and <code>::</code> multi-path syntax</li>
175
+ <li><strong>Lazy initialization</strong> — <code>REGEX.stdExp</code> compiles 13 patterns on first access</li>
176
+ </ul>
177
+
178
+ <h3>Contracts</h3>
179
+ <table>
180
+ <tr><th>Category</th><th>Contracts</th></tr>
181
+ <tr><td>Equality</td><td>EQ, DIFFERENT</td></tr>
182
+ <tr><td>Type</td><td>TYPE, INSTANCE, DEFINED, UNDEFINED</td></tr>
183
+ <tr><td>Comparison</td><td>GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL</td></tr>
184
+ <tr><td>Pattern</td><td>REGEX (+ 13 built-in patterns), ZOD</td></tr>
185
+ <tr><td>Structure</td><td>JSON_OP, JSON_Parse, HasAttribute</td></tr>
186
+ <tr><td>Logic</td><td>OR, AE (Array Element), IF (conditional)</td></tr>
187
+ </table>
188
+
189
+ <!-- 2. Code Quality -->
190
+ <h2><span class="section-num">2.</span> Code Quality</h2>
191
+
192
+ <h3>Compiler Status</h3>
193
+ <p>
194
+ <span class="badge badge-pass">0 errors</span>
195
+ Strict mode, <code>experimentalDecorators</code>, <code>emitDecoratorMetadata</code>,
196
+ target ES6, <code>moduleResolution: "bundler"</code>, explicit <code>rootDir</code>.
197
+ </p>
198
+
199
+ <h3>Type Safety</h3>
200
+ <p>
201
+ ~13 <code>any</code> annotations remain, all at reflection/decorator boundaries where TypeScript
202
+ cannot express the runtime types. Each is documented with a <code>biome-ignore</code> comment.
203
+ </p>
204
+
205
+ <h3>Documentation</h3>
206
+ <p>
207
+ 100% JSDoc on public methods with <code>@param</code>, <code>@returns</code>, and <code>@throws</code> tags.
208
+ Region markers structure each file into logical sections. TypeDoc generates full HTML docs.
209
+ </p>
210
+
211
+ <h3>File Breakdown</h3>
212
+ <table>
213
+ <tr><th>File</th><th>LOC</th><th>Responsibility</th></tr>
214
+ <tr><td><code>DBC.ts</code></td><td>752</td><td>Core infrastructure: decorators, caching, path resolution, reporting</td></tr>
215
+ <tr><td><code>Demo.ts</code></td><td>352</td><td>Usage examples (webpack entry point)</td></tr>
216
+ <tr><td><code>AE.ts</code></td><td>271</td><td>Array element contract (most complex contract)</td></tr>
217
+ <tr><td><code>REGEX.ts</code></td><td>179</td><td>Pattern matching + 13 lazy standard expressions</td></tr>
218
+ <tr><td><code>OR.ts</code></td><td>175</td><td>Logical OR composition</td></tr>
219
+ <tr><td colspan="3" style="color:var(--text-muted)">Remaining 16 files: 30–150 LOC each</td></tr>
220
+ </table>
221
+ <p>No dead code, no unused imports, no TODO/FIXME comments.</p>
222
+
223
+ <!-- 3. Test Coverage -->
224
+ <h2><span class="section-num">3.</span> Test Coverage</h2>
225
+ <p>
226
+ <span class="badge badge-pass">119 tests</span>
227
+ <span class="badge badge-pass">15 suites</span>
228
+ <span class="badge badge-pass">all passing</span>
229
+ </p>
230
+
231
+ <table>
232
+ <tr><th>Test Category</th><th>Count</th><th>Contracts Covered</th></tr>
233
+ <tr><td><code>checkAlgorithm()</code> unit tests</td><td>~45</td><td>All 15 contract classes</td></tr>
234
+ <tr><td><code>@PRE</code> decorator integration</td><td>~25</td><td>REGEX, TYPE, EQ, GREATER, GREATER_OR_EQUAL, LESS, LESS_OR_EQUAL, DIFFERENT, INSTANCE, AE, OR</td></tr>
235
+ <tr><td><code>@POST</code> decorator integration</td><td>~10</td><td>REGEX, EQ</td></tr>
236
+ <tr><td><code>@INVARIANT</code> integration</td><td>~8</td><td>REGEX (init, reassign, valid, invalid)</td></tr>
237
+ <tr><td><code>@ParamvalueProvider</code></td><td>~5</td><td>Multi-parameter contracts</td></tr>
238
+ <tr><td>Instance <code>check()</code></td><td>~15</td><td>IF, ZOD, DEFINED, UNDEFINED, HasAttribute, EQ, TYPE</td></tr>
239
+ <tr><td>DBC infrastructure</td><td>~11</td><td>register(), isolated(), infringement messages</td></tr>
240
+ </table>
241
+
242
+ <h3>Untested Areas (low risk)</h3>
243
+ <ul>
244
+ <li>Static method decorators (same codepath as instance)</li>
245
+ <li><code>DBC.resolve()</code> branch coverage (12+ branches, tested indirectly)</li>
246
+ <li>No coverage reporting configuration</li>
247
+ </ul>
248
+
249
+ <!-- 4. Security -->
250
+ <h2><span class="section-num">4.</span> Security</h2>
251
+ <table>
252
+ <tr><th>Protection</th><th>Implementation</th><th>Status</th></tr>
253
+ <tr><td>Prototype pollution</td><td><code>resolve()</code> blocks <code>__proto__</code>, <code>constructor</code>, <code>prototype</code></td><td><span class="badge badge-pass">✓</span></td></tr>
254
+ <tr><td>ReDoS</td><td><code>REGEX.stdExp.url</code> uses non-backtracking pattern</td><td><span class="badge badge-pass">✓</span></td></tr>
255
+ <tr><td>Error message injection</td><td><code>sanitize()</code> HTML-entity-encodes interpolated values</td><td><span class="badge badge-pass">✓</span></td></tr>
256
+ <tr><td>No dangerous patterns</td><td>No <code>eval()</code>, <code>Function()</code>, or dynamic code execution</td><td><span class="badge badge-pass">✓</span></td></tr>
257
+ <tr><td>Minimal dependencies</td><td>Only <code>reflect-metadata</code> + <code>zod</code> at runtime</td><td><span class="badge badge-pass">✓</span></td></tr>
258
+ <tr><td>0 npm vulnerabilities</td><td>Clean dependency tree</td><td><span class="badge badge-pass">✓</span></td></tr>
259
+ </table>
260
+
261
+ <!-- 5. Performance -->
262
+ <h2><span class="section-num">5.</span> Performance</h2>
263
+ <table>
264
+ <tr><th>Optimization</th><th>Detail</th></tr>
265
+ <tr><td>Lazy regex</td><td><code>REGEX.stdExp</code> compiles 13 patterns on first access, not at import</td></tr>
266
+ <tr><td>Cached DBC lookups</td><td>All 4 decorator methods resolve DBC instance once, reuse on subsequent calls</td></tr>
267
+ <tr><td>Path token cache</td><td>Parsed path tokens cached (FIFO, max 1,000 entries)</td></tr>
268
+ <tr><td>DBC instance cache</td><td>Namespace paths cached (FIFO, max 1,000 entries)</td></tr>
269
+ <tr><td>Zero-cost disable</td><td>Short-circuit before validation when execution settings are off</td></tr>
270
+ </table>
271
+
272
+ <h3>Inherent Characteristics</h3>
273
+ <ul>
274
+ <li><strong>Closures per decorated method</strong> — required by the decorator pattern, cannot be eliminated without breaking the API</li>
275
+ <li><strong><code>paramValueRequests</code> Map</strong> — O(1) key lookup; inner iteration over contracted params only (typically 1–5)</li>
276
+ <li><strong>Contract loading</strong> — each contract in its own file; consumers can import individually for tree-shaking</li>
277
+ </ul>
278
+
279
+ <!-- 6. Build & Tooling -->
280
+ <h2><span class="section-num">6.</span> Build &amp; Tooling</h2>
281
+ <table>
282
+ <tr><th>Tool</th><th>Version</th><th>Configuration</th></tr>
283
+ <tr><td>TypeScript</td><td>5.8</td><td>Strict, decorators, ES6, <code>moduleResolution: "bundler"</code></td></tr>
284
+ <tr><td>Webpack</td><td>5.99</td><td><code>ts-loader</code>, inline source maps</td></tr>
285
+ <tr><td>Jest + ts-jest</td><td>29.7</td><td>jsdom environment, 15 test suites</td></tr>
286
+ <tr><td>Biome</td><td>configured</td><td>Tabs, recommended lint rules, import organization</td></tr>
287
+ <tr><td>TypeDoc</td><td>configured</td><td><code>npm run docs</code> generates HTML docs</td></tr>
288
+ </table>
289
+ <p><strong>Runtime dependencies:</strong> <code>reflect-metadata</code>, <code>@types/reflect-metadata</code>, <code>zod</code> — minimal and appropriate.</p>
290
+
291
+ <!-- 7. Strengths -->
292
+ <h2><span class="section-num">7.</span> Strengths</h2>
293
+ <ul>
294
+ <li><strong>Comprehensive contract library</strong> — 16 contracts covering types, equality, comparison, regex, JSON, arrays, instances, conditionals, and schema validation</li>
295
+ <li><strong>Ergonomic API</strong> — non-invasive decorators that preserve clean method signatures</li>
296
+ <li><strong>Rich error context</strong> — class name, method name, parameter index, path, and violation details in every message</li>
297
+ <li><strong>Flexible execution</strong> — enable/disable preconditions, postconditions, and invariants independently; log or throw</li>
298
+ <li><strong>Deep property validation</strong> — dot notation, array indices, method calls, <code>::</code> multi-path syntax</li>
299
+ <li><strong>Type-safe imperative checks</strong> — <code>tsCheck()</code> methods for use outside decorators</li>
300
+ <li><strong>Standard pattern library</strong> — 13 ready-to-use RegExp patterns lazily compiled</li>
301
+ <li><strong>Zero technical debt</strong> — no TODO/FIXME, no dead code, 0 TS errors, 0 lint violations</li>
302
+ </ul>
303
+
304
+ <!-- 8. Recommendations -->
305
+ <h2><span class="section-num">8.</span> Recommendations</h2>
306
+ <table>
307
+ <tr><th>#</th><th>Recommendation</th><th>Priority</th><th>Effort</th></tr>
308
+ <tr>
309
+ <td>1</td>
310
+ <td>Add CI/CD workflow (GitHub Actions) — lint, test, build on push/PR</td>
311
+ <td><span class="priority-med">Medium</span></td>
312
+ <td>2h</td>
313
+ </tr>
314
+ <tr>
315
+ <td>2</td>
316
+ <td>Add Jest coverage reporting (<code>--coverage</code> + thresholds)</td>
317
+ <td><span class="priority-low">Low</span></td>
318
+ <td>30m</td>
319
+ </tr>
320
+ <tr>
321
+ <td>3</td>
322
+ <td>Add pre-commit hooks via husky/lint-staged</td>
323
+ <td><span class="priority-low">Low</span></td>
324
+ <td>1h</td>
325
+ </tr>
326
+ </table>
327
+
328
+ <!-- Appendix -->
329
+ <h2>Appendix: Null/Undefined Behavior Matrix</h2>
330
+ <p>Each contract's behavior with null/undefined inputs is intentional and consistent with its purpose:</p>
331
+ <table>
332
+ <tr><th>Contract</th><th><code>null</code></th><th><code>undefined</code></th><th>Rationale</th></tr>
333
+ <tr><td>DEFINED</td><td>Error</td><td>Error</td><td>Exists to catch null/undefined</td></tr>
334
+ <tr><td>UNDEFINED</td><td>Error</td><td>Pass</td><td>Exists to require undefined</td></tr>
335
+ <tr><td>TYPE</td><td>Pass</td><td>Pass</td><td>Optional parameters — no value, no violation</td></tr>
336
+ <tr><td>REGEX</td><td>Pass</td><td>Pass</td><td>Optional parameters — no value, no violation</td></tr>
337
+ <tr><td>INSTANCE</td><td>Pass</td><td>Pass</td><td>Optional parameters — no value, no violation</td></tr>
338
+ <tr><td>EQ</td><td><code>=== null</code></td><td><code>=== undefined</code></td><td>Strict equality works correctly</td></tr>
339
+ <tr><td>COMPARISON</td><td>Crashes</td><td>Crashes</td><td>Comparing null with > is a programming error</td></tr>
340
+ <tr><td>AE</td><td>Delegates</td><td>Delegates</td><td>Passes through to sub-contract</td></tr>
341
+ <tr><td>OR</td><td>Delegates</td><td>Delegates</td><td>Passes through to sub-contract</td></tr>
342
+ <tr><td>IF</td><td>Delegates</td><td>Delegates</td><td>Depends on condition/inCase contracts</td></tr>
343
+ <tr><td>JSON_OP</td><td>Error</td><td>Error</td><td>Invalid JSON input</td></tr>
344
+ <tr><td>JSON_Parse</td><td>Throws</td><td>Throws</td><td>Invalid JSON string</td></tr>
345
+ <tr><td>HasAttribute</td><td>Error</td><td>Error</td><td>Not an HTMLElement</td></tr>
346
+ <tr><td>ZOD</td><td>Delegates</td><td>Delegates</td><td>Depends on Zod schema definition</td></tr>
347
+ </table>
348
+
349
+ </body>
350
+ </html>