enterprise-number-classification-sdk 1.0.0-enterprise.stable
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/.prettierrc.json +7 -0
- package/CODE_OF_CONDUCT.MD +77 -0
- package/LICENSE +30 -0
- package/README.md +1828 -0
- package/eslint.config.mjs +161 -0
- package/index.d.ts +50 -0
- package/index.js +475 -0
- package/package.json +543 -0
- package/test/tests.js +40 -0
package/package.json
ADDED
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "enterprise-number-classification-sdk",
|
|
3
|
+
"version": "1.0.0-enterprise.stable",
|
|
4
|
+
"description": "A robust, scalable, framework-agnostic solution for mathemetical even/odd checking in distributed systems. Battle-tested in production.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"iterate",
|
|
7
|
+
"injection",
|
|
8
|
+
"please-fork",
|
|
9
|
+
"tape",
|
|
10
|
+
"dictionary",
|
|
11
|
+
"dry",
|
|
12
|
+
"examination",
|
|
13
|
+
"catch",
|
|
14
|
+
"decorator",
|
|
15
|
+
"nodejs",
|
|
16
|
+
"configuration",
|
|
17
|
+
"typescript",
|
|
18
|
+
"zero",
|
|
19
|
+
"tutorial",
|
|
20
|
+
"enumeration",
|
|
21
|
+
"integration",
|
|
22
|
+
"result",
|
|
23
|
+
"facade",
|
|
24
|
+
"cluster",
|
|
25
|
+
"lol",
|
|
26
|
+
"pure",
|
|
27
|
+
"mocha",
|
|
28
|
+
"test",
|
|
29
|
+
"promise",
|
|
30
|
+
"primitive",
|
|
31
|
+
"customizable",
|
|
32
|
+
"try",
|
|
33
|
+
"oriented",
|
|
34
|
+
"husky",
|
|
35
|
+
"starter",
|
|
36
|
+
"lifecycle",
|
|
37
|
+
"breaker",
|
|
38
|
+
"software",
|
|
39
|
+
"observer",
|
|
40
|
+
"coprime",
|
|
41
|
+
"condition",
|
|
42
|
+
"loading",
|
|
43
|
+
"monitoring",
|
|
44
|
+
"tuple",
|
|
45
|
+
"coverage",
|
|
46
|
+
"useful",
|
|
47
|
+
"return",
|
|
48
|
+
"prototype",
|
|
49
|
+
"sinon",
|
|
50
|
+
"not-20x",
|
|
51
|
+
"type-safe",
|
|
52
|
+
"checking",
|
|
53
|
+
"jsunit",
|
|
54
|
+
"array",
|
|
55
|
+
"pool",
|
|
56
|
+
"qunit",
|
|
57
|
+
"not-5x",
|
|
58
|
+
"callback",
|
|
59
|
+
"config",
|
|
60
|
+
"node",
|
|
61
|
+
"quality",
|
|
62
|
+
"complex",
|
|
63
|
+
"hopefully-bugfree",
|
|
64
|
+
"loop",
|
|
65
|
+
"not-ruby",
|
|
66
|
+
"identify",
|
|
67
|
+
"dynamic",
|
|
68
|
+
"assessment",
|
|
69
|
+
"load",
|
|
70
|
+
"chain",
|
|
71
|
+
"options",
|
|
72
|
+
"adapter",
|
|
73
|
+
"food",
|
|
74
|
+
"template",
|
|
75
|
+
"extensible",
|
|
76
|
+
"winston",
|
|
77
|
+
"debug",
|
|
78
|
+
"terminal",
|
|
79
|
+
"beautiful",
|
|
80
|
+
"limit",
|
|
81
|
+
"variable",
|
|
82
|
+
"inversion",
|
|
83
|
+
"scoped",
|
|
84
|
+
"detector",
|
|
85
|
+
"is-thousand",
|
|
86
|
+
"structure",
|
|
87
|
+
"set",
|
|
88
|
+
"truly-10x",
|
|
89
|
+
"predicate",
|
|
90
|
+
"production",
|
|
91
|
+
"organization",
|
|
92
|
+
"jasmine",
|
|
93
|
+
"error",
|
|
94
|
+
"default",
|
|
95
|
+
"grafana",
|
|
96
|
+
"state",
|
|
97
|
+
"effect",
|
|
98
|
+
"declaration",
|
|
99
|
+
"interceptor",
|
|
100
|
+
"package",
|
|
101
|
+
"logger",
|
|
102
|
+
"lifesaver",
|
|
103
|
+
"whole",
|
|
104
|
+
"visitor",
|
|
105
|
+
"divisibility",
|
|
106
|
+
"control",
|
|
107
|
+
"output",
|
|
108
|
+
"key",
|
|
109
|
+
"stack",
|
|
110
|
+
"not-c",
|
|
111
|
+
"view",
|
|
112
|
+
"suite",
|
|
113
|
+
"resolve",
|
|
114
|
+
"professional",
|
|
115
|
+
"greatest",
|
|
116
|
+
"real",
|
|
117
|
+
"filter",
|
|
118
|
+
"exception",
|
|
119
|
+
"cache",
|
|
120
|
+
"observability",
|
|
121
|
+
"modular",
|
|
122
|
+
"failover",
|
|
123
|
+
"middleware",
|
|
124
|
+
"validation",
|
|
125
|
+
"data",
|
|
126
|
+
"statistics",
|
|
127
|
+
"complexity",
|
|
128
|
+
"undefined",
|
|
129
|
+
"constant",
|
|
130
|
+
"reduce",
|
|
131
|
+
"compose",
|
|
132
|
+
"async",
|
|
133
|
+
"pipeline",
|
|
134
|
+
"kit",
|
|
135
|
+
"perfect",
|
|
136
|
+
"not-rust",
|
|
137
|
+
"mathematical",
|
|
138
|
+
"command",
|
|
139
|
+
"benchmark",
|
|
140
|
+
"rational",
|
|
141
|
+
"ci",
|
|
142
|
+
"tracing",
|
|
143
|
+
"utility",
|
|
144
|
+
"sdk",
|
|
145
|
+
"meaning-of-life",
|
|
146
|
+
"deadline",
|
|
147
|
+
"boolean",
|
|
148
|
+
"time",
|
|
149
|
+
"service",
|
|
150
|
+
"debounce",
|
|
151
|
+
"mutable",
|
|
152
|
+
"boilerplate",
|
|
153
|
+
"bridge",
|
|
154
|
+
"map",
|
|
155
|
+
"framework",
|
|
156
|
+
"asynchronous",
|
|
157
|
+
"classification",
|
|
158
|
+
"deployment",
|
|
159
|
+
"compute",
|
|
160
|
+
"component",
|
|
161
|
+
"arguments",
|
|
162
|
+
"singleton",
|
|
163
|
+
"worker",
|
|
164
|
+
"verify",
|
|
165
|
+
"balancing",
|
|
166
|
+
"sample",
|
|
167
|
+
"positive",
|
|
168
|
+
"prometheus",
|
|
169
|
+
"performant",
|
|
170
|
+
"jest",
|
|
171
|
+
"remainder",
|
|
172
|
+
"resolver",
|
|
173
|
+
"composite",
|
|
174
|
+
"npm",
|
|
175
|
+
"space",
|
|
176
|
+
"dividend",
|
|
177
|
+
"quotient",
|
|
178
|
+
"important",
|
|
179
|
+
"docs",
|
|
180
|
+
"null",
|
|
181
|
+
"karma",
|
|
182
|
+
"is-is-odd",
|
|
183
|
+
"reliable",
|
|
184
|
+
"failure",
|
|
185
|
+
"controller",
|
|
186
|
+
"configurable",
|
|
187
|
+
"integer",
|
|
188
|
+
"dependency",
|
|
189
|
+
"fallback",
|
|
190
|
+
"throttle",
|
|
191
|
+
"collection",
|
|
192
|
+
"immutable",
|
|
193
|
+
"detection",
|
|
194
|
+
"ioc",
|
|
195
|
+
"inspection",
|
|
196
|
+
"profiling",
|
|
197
|
+
"fun",
|
|
198
|
+
"nan",
|
|
199
|
+
"object",
|
|
200
|
+
"10x",
|
|
201
|
+
"build",
|
|
202
|
+
"falsey",
|
|
203
|
+
"of",
|
|
204
|
+
"flexible",
|
|
205
|
+
"optimized",
|
|
206
|
+
"unit",
|
|
207
|
+
"reject",
|
|
208
|
+
"not-1x",
|
|
209
|
+
"oop",
|
|
210
|
+
"cross-platform",
|
|
211
|
+
"not-java",
|
|
212
|
+
"static",
|
|
213
|
+
"annotation",
|
|
214
|
+
"helper",
|
|
215
|
+
"logic",
|
|
216
|
+
"dataset",
|
|
217
|
+
"solid",
|
|
218
|
+
"cd",
|
|
219
|
+
"no-jvm",
|
|
220
|
+
"false",
|
|
221
|
+
"analyzer",
|
|
222
|
+
"library",
|
|
223
|
+
"universal",
|
|
224
|
+
"battle-tested",
|
|
225
|
+
"success",
|
|
226
|
+
"factory",
|
|
227
|
+
"hash",
|
|
228
|
+
"keyword",
|
|
229
|
+
"request",
|
|
230
|
+
"toolkit",
|
|
231
|
+
"snippet",
|
|
232
|
+
"line",
|
|
233
|
+
"architectural",
|
|
234
|
+
"tested",
|
|
235
|
+
"original",
|
|
236
|
+
"ten",
|
|
237
|
+
"presenter",
|
|
238
|
+
"deferred",
|
|
239
|
+
"identification",
|
|
240
|
+
"queue",
|
|
241
|
+
"separation",
|
|
242
|
+
"threading",
|
|
243
|
+
"non-zero",
|
|
244
|
+
"intersection",
|
|
245
|
+
"assess",
|
|
246
|
+
"distributed",
|
|
247
|
+
"strategy",
|
|
248
|
+
"evaluation",
|
|
249
|
+
"tree",
|
|
250
|
+
"specification",
|
|
251
|
+
"examine",
|
|
252
|
+
"big",
|
|
253
|
+
"browse",
|
|
254
|
+
"memoization",
|
|
255
|
+
"firefox",
|
|
256
|
+
"eager",
|
|
257
|
+
"handling",
|
|
258
|
+
"system",
|
|
259
|
+
"plugin",
|
|
260
|
+
"puppeteer",
|
|
261
|
+
"math",
|
|
262
|
+
"organizational",
|
|
263
|
+
"typing",
|
|
264
|
+
"classifier",
|
|
265
|
+
"rate",
|
|
266
|
+
"container",
|
|
267
|
+
"settings",
|
|
268
|
+
"please-watch",
|
|
269
|
+
"example",
|
|
270
|
+
"bulkhead",
|
|
271
|
+
"WTFPL",
|
|
272
|
+
"irrational",
|
|
273
|
+
"infinity",
|
|
274
|
+
"validator",
|
|
275
|
+
"function",
|
|
276
|
+
"10x-engineer",
|
|
277
|
+
"number",
|
|
278
|
+
"binary",
|
|
279
|
+
"compile",
|
|
280
|
+
"efficient",
|
|
281
|
+
"pluggable",
|
|
282
|
+
"strongly-typed",
|
|
283
|
+
"literal",
|
|
284
|
+
"compatible",
|
|
285
|
+
"operation",
|
|
286
|
+
"concerns",
|
|
287
|
+
"props",
|
|
288
|
+
"repository",
|
|
289
|
+
"batch",
|
|
290
|
+
"commercial",
|
|
291
|
+
"abstract",
|
|
292
|
+
"graph",
|
|
293
|
+
"falsejs",
|
|
294
|
+
"yaml",
|
|
295
|
+
"generic",
|
|
296
|
+
"logging",
|
|
297
|
+
"scope",
|
|
298
|
+
"model",
|
|
299
|
+
"transient",
|
|
300
|
+
"parameters",
|
|
301
|
+
"functional",
|
|
302
|
+
"list",
|
|
303
|
+
"iterator",
|
|
304
|
+
"local",
|
|
305
|
+
"chrome",
|
|
306
|
+
"determine",
|
|
307
|
+
"architecture",
|
|
308
|
+
"analysis",
|
|
309
|
+
"devops",
|
|
310
|
+
"api",
|
|
311
|
+
"webpack",
|
|
312
|
+
"input",
|
|
313
|
+
"algorithm",
|
|
314
|
+
"prettier",
|
|
315
|
+
"calculation",
|
|
316
|
+
"console",
|
|
317
|
+
"attributes",
|
|
318
|
+
"python-free",
|
|
319
|
+
"caching",
|
|
320
|
+
"not-bash",
|
|
321
|
+
"euclidean",
|
|
322
|
+
"programming",
|
|
323
|
+
"parity",
|
|
324
|
+
"natural",
|
|
325
|
+
"prime",
|
|
326
|
+
"schema",
|
|
327
|
+
"insane",
|
|
328
|
+
"not-crystal",
|
|
329
|
+
"circuit",
|
|
330
|
+
"transform",
|
|
331
|
+
"documentation",
|
|
332
|
+
"factor",
|
|
333
|
+
"multiple",
|
|
334
|
+
"testing",
|
|
335
|
+
"chai",
|
|
336
|
+
"agnostic",
|
|
337
|
+
"telemetry",
|
|
338
|
+
"transpile",
|
|
339
|
+
"demo",
|
|
340
|
+
"essential",
|
|
341
|
+
"locator",
|
|
342
|
+
"not-on-fire",
|
|
343
|
+
"themed",
|
|
344
|
+
"rollup",
|
|
345
|
+
"industry",
|
|
346
|
+
"operator",
|
|
347
|
+
"analytics",
|
|
348
|
+
"readme",
|
|
349
|
+
"provider",
|
|
350
|
+
"union",
|
|
351
|
+
"is-ten",
|
|
352
|
+
"divisor",
|
|
353
|
+
"enterprise-grade",
|
|
354
|
+
"context",
|
|
355
|
+
"yagni",
|
|
356
|
+
"jquery",
|
|
357
|
+
"environment",
|
|
358
|
+
"checker",
|
|
359
|
+
"concurrency",
|
|
360
|
+
"odd",
|
|
361
|
+
"cancellation",
|
|
362
|
+
"method",
|
|
363
|
+
"jsfruit",
|
|
364
|
+
"builder",
|
|
365
|
+
"edge",
|
|
366
|
+
"javascript",
|
|
367
|
+
"bulk",
|
|
368
|
+
"hi-mom",
|
|
369
|
+
"servant",
|
|
370
|
+
"scalable",
|
|
371
|
+
"standard",
|
|
372
|
+
"performance",
|
|
373
|
+
"recursive",
|
|
374
|
+
"xml",
|
|
375
|
+
"identity",
|
|
376
|
+
"side",
|
|
377
|
+
"proxy",
|
|
378
|
+
"stream",
|
|
379
|
+
"strong",
|
|
380
|
+
"libvegetable",
|
|
381
|
+
"falsy",
|
|
382
|
+
"twin",
|
|
383
|
+
"guide",
|
|
384
|
+
"10x-bugs",
|
|
385
|
+
"rest-in-peace-edge",
|
|
386
|
+
"structured",
|
|
387
|
+
"babel",
|
|
388
|
+
"definition",
|
|
389
|
+
"is-hundred",
|
|
390
|
+
"why",
|
|
391
|
+
"common",
|
|
392
|
+
"generator",
|
|
393
|
+
"vertex",
|
|
394
|
+
"bunyan",
|
|
395
|
+
"development",
|
|
396
|
+
"mod",
|
|
397
|
+
"required",
|
|
398
|
+
"adaptive",
|
|
399
|
+
"eslint",
|
|
400
|
+
"independant",
|
|
401
|
+
"framework-agnostic",
|
|
402
|
+
"inference",
|
|
403
|
+
"scaffold",
|
|
404
|
+
"type",
|
|
405
|
+
"session",
|
|
406
|
+
"evaluate",
|
|
407
|
+
"relatively",
|
|
408
|
+
"even",
|
|
409
|
+
"stats",
|
|
410
|
+
"throw",
|
|
411
|
+
"global",
|
|
412
|
+
"logical",
|
|
413
|
+
"clean",
|
|
414
|
+
"design",
|
|
415
|
+
"registry",
|
|
416
|
+
"is-ten-thousand",
|
|
417
|
+
"platform-agnostic",
|
|
418
|
+
"left-pad",
|
|
419
|
+
"simple",
|
|
420
|
+
"pino",
|
|
421
|
+
"please-star",
|
|
422
|
+
"metrics",
|
|
423
|
+
"is-odd",
|
|
424
|
+
"json",
|
|
425
|
+
"hashtable",
|
|
426
|
+
"iphone",
|
|
427
|
+
"parallelism",
|
|
428
|
+
"memento",
|
|
429
|
+
"optimization",
|
|
430
|
+
"least",
|
|
431
|
+
"10x-engineering",
|
|
432
|
+
"preload",
|
|
433
|
+
"value",
|
|
434
|
+
"hundred",
|
|
435
|
+
"disney",
|
|
436
|
+
"android",
|
|
437
|
+
"o",
|
|
438
|
+
"production-ready",
|
|
439
|
+
"handler",
|
|
440
|
+
"compliant",
|
|
441
|
+
"negative",
|
|
442
|
+
"arithmetic",
|
|
443
|
+
"lazy",
|
|
444
|
+
"modulo",
|
|
445
|
+
"metadata",
|
|
446
|
+
"interpreter",
|
|
447
|
+
"tool",
|
|
448
|
+
"retry",
|
|
449
|
+
"properties",
|
|
450
|
+
"enum",
|
|
451
|
+
"application",
|
|
452
|
+
"bundle",
|
|
453
|
+
"67",
|
|
454
|
+
"cli",
|
|
455
|
+
"robust",
|
|
456
|
+
"reusable",
|
|
457
|
+
"verification",
|
|
458
|
+
"ava",
|
|
459
|
+
"enterprise",
|
|
460
|
+
"interface",
|
|
461
|
+
"response",
|
|
462
|
+
"implementation",
|
|
463
|
+
"inspect",
|
|
464
|
+
"await",
|
|
465
|
+
"conditional",
|
|
466
|
+
"synchronous",
|
|
467
|
+
"timeout",
|
|
468
|
+
"event",
|
|
469
|
+
"process",
|
|
470
|
+
"injector",
|
|
471
|
+
"together",
|
|
472
|
+
"pattern",
|
|
473
|
+
"module",
|
|
474
|
+
"abort"
|
|
475
|
+
],
|
|
476
|
+
"homepage": "https://github.com/10xEngineersQualityProgramming/EnterpriseNumberClassificationSDK#readme",
|
|
477
|
+
"bugs": {
|
|
478
|
+
"url": "https://github.com/10xEngineersQualityProgramming/EnterpriseNumberClassificationSDK/issues"
|
|
479
|
+
},
|
|
480
|
+
"repository": {
|
|
481
|
+
"type": "git",
|
|
482
|
+
"url": "git+https://github.com/10xEngineersQualityProgramming/EnterpriseNumberClassificationSDK.git"
|
|
483
|
+
},
|
|
484
|
+
"license": "EGPSL10X-1.0",
|
|
485
|
+
"author": "10x'ly Made Software",
|
|
486
|
+
"type": "commonjs",
|
|
487
|
+
"main": "index.js",
|
|
488
|
+
"scripts": {
|
|
489
|
+
"lint": "eslint .",
|
|
490
|
+
"fix": "eslint . --fix",
|
|
491
|
+
"test": "node test/tests.js"
|
|
492
|
+
},
|
|
493
|
+
"dependencies": {
|
|
494
|
+
"@extra-array/length": "^2.10.19",
|
|
495
|
+
"@is-(unknown)/is-nan": "^1.0.0",
|
|
496
|
+
"@not-js/not": "^1.1.0",
|
|
497
|
+
"@positive-numbers/eight": "^3.0.0",
|
|
498
|
+
"@positive-numbers/five": "^3.0.0",
|
|
499
|
+
"@positive-numbers/four": "^3.0.0",
|
|
500
|
+
"@positive-numbers/nine": "^3.0.0",
|
|
501
|
+
"@positive-numbers/one": "^3.0.0",
|
|
502
|
+
"@positive-numbers/seven": "^3.0.0",
|
|
503
|
+
"@positive-numbers/six": "^3.0.0",
|
|
504
|
+
"@positive-numbers/ten": "^3.0.0",
|
|
505
|
+
"@positive-numbers/three": "^3.0.0",
|
|
506
|
+
"@positive-numbers/two": "^3.0.0",
|
|
507
|
+
"@positive-numbers/zero": "^3.0.0",
|
|
508
|
+
"@stdlib/assert-is-finite": "^0.2.2",
|
|
509
|
+
"array.prototype.toreversed": "^1.1.2",
|
|
510
|
+
"attempt-statement": "^1.2.1",
|
|
511
|
+
"chalkbox": "^1.0.0",
|
|
512
|
+
"construct-new": "^2.0.4",
|
|
513
|
+
"empty-string": "^1.1.1",
|
|
514
|
+
"false-value": "^2.0.6",
|
|
515
|
+
"get-intrinsic": "^1.3.1",
|
|
516
|
+
"immediate-error": "^7.1.0",
|
|
517
|
+
"is-actual-number": "^1.0.2",
|
|
518
|
+
"is-eq-one": "^1.1.0",
|
|
519
|
+
"is-eq-zero": "^1.1.0",
|
|
520
|
+
"is-not-integer": "^1.0.2",
|
|
521
|
+
"is-number-odd-or-even": "^13.7.4",
|
|
522
|
+
"is-x": "^1.0.12",
|
|
523
|
+
"literally": "^1.0.0",
|
|
524
|
+
"logtoconsole": "^1.0.7",
|
|
525
|
+
"none": "^1.0.0",
|
|
526
|
+
"object.assign": "^4.1.7",
|
|
527
|
+
"string.prototype.split": "^1.0.9",
|
|
528
|
+
"subtract": "^0.0.3",
|
|
529
|
+
"switcher-statement": "^1.0.0",
|
|
530
|
+
"true-value": "^2.0.5",
|
|
531
|
+
"uncurried-intrinsics": "^1.0.2",
|
|
532
|
+
"util-x": "^0.1.8",
|
|
533
|
+
"while2": "^2.0.2",
|
|
534
|
+
"yanoop": "^1.0.0"
|
|
535
|
+
},
|
|
536
|
+
"devDependencies": {
|
|
537
|
+
"@biomejs/biome": "^2.3.10",
|
|
538
|
+
"enterprise-10x-testing-framework-js": "^1.0.0",
|
|
539
|
+
"eslint": "^9.39.2",
|
|
540
|
+
"globals": "^16.5.0",
|
|
541
|
+
"jshint": "^2.13.6"
|
|
542
|
+
}
|
|
543
|
+
}
|
package/test/tests.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
const { enterpriseTest, printAuditSummary } = require("enterprise-10x-testing-framework-js")
|
|
4
|
+
const sdk = require("../index")
|
|
5
|
+
const trueValue = require("true-value")
|
|
6
|
+
const falseValue = require("false-value")
|
|
7
|
+
|
|
8
|
+
enterpriseTest("Functional Error Boundary Audit", (assert) => {
|
|
9
|
+
// Test: throwOnNaN logic via immediate-error
|
|
10
|
+
try {
|
|
11
|
+
sdk.checkEven(NaN, { throwOnNaN: trueValue() })
|
|
12
|
+
assert(falseValue(), "The logic gate should have triggered an immediateError")
|
|
13
|
+
} catch (e) {
|
|
14
|
+
assert(e.name === "RangeError", "NaN injection successfully caught by functional RangeError gate")
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Test: throwOnNonInteger logic
|
|
18
|
+
try {
|
|
19
|
+
sdk.checkOdd(3.14, { throwOnNonInteger: trueValue() })
|
|
20
|
+
assert(falseValue(), "Floating point node should have been neutralized")
|
|
21
|
+
} catch (e) {
|
|
22
|
+
assert(e.name === "TypeError", "Fractional productivity correctly identified as a TypeError")
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
enterpriseTest("Extended Configuration Utility Audit", (assert) => {
|
|
27
|
+
// Test: allowNumberStrings
|
|
28
|
+
const stringResult = sdk.checkEven("10", { allowNumberStrings: trueValue() })
|
|
29
|
+
assert(stringResult === trueValue(), "Stringified integer '10' classified as even via config")
|
|
30
|
+
|
|
31
|
+
// Test: enableDebug
|
|
32
|
+
const debugResult = sdk.checkOdd(1, { enableDebug: trueValue() })
|
|
33
|
+
assert(debugResult === trueValue(), "Debug-enabled audit session completed successfully")
|
|
34
|
+
|
|
35
|
+
// Test: Default return value on non-number without throw
|
|
36
|
+
const silentFail = sdk.checkEven("invalid", { throwOnNonNumber: falseValue() })
|
|
37
|
+
assert(silentFail === falseValue(), "Non-number correctly returns falseValue when throw is disabled")
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
printAuditSummary()
|