xdbc 1.0.75 → 1.0.76

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/DBC/AE.js CHANGED
@@ -29,6 +29,7 @@ export class AE extends DBC {
29
29
  // biome-ignore lint/suspicious/noExplicitAny: <explanation>
30
30
  condition, value, index, idxEnd) {
31
31
  if (Array.isArray(value)) {
32
+ console.log("S", value);
32
33
  if (index !== undefined && idxEnd === undefined) {
33
34
  if (index > -1 && index < value.length) {
34
35
  const result = condition.check(value[index]);
@@ -38,12 +39,12 @@ export class AE extends DBC {
38
39
  }
39
40
  return true; // In order for optional parameter to not cause an error if they are omitted.
40
41
  }
41
- for (let i = index ? index : 0; i <
42
- (idxEnd !== undefined
43
- ? idxEnd !== -1
44
- ? idxEnd + 1
45
- : value.length
46
- : value.length); i++) {
42
+ const ending = idxEnd !== undefined
43
+ ? idxEnd !== -1
44
+ ? idxEnd + 1
45
+ : value.length
46
+ : value.length;
47
+ for (let i = index ? index : 0; i < ending; i++) {
47
48
  const result = condition.check(value[i]);
48
49
  if (result !== true) {
49
50
  return `Violating-Arrayelement at index ${i}. ${result}`;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.75",
2
+ "version": "1.0.76",
3
3
  "name": "xdbc",
4
4
  "scripts": {
5
5
  "format": "biome format ./src --write",
package/src/DBC/AE.ts CHANGED
@@ -33,6 +33,7 @@ export class AE extends DBC {
33
33
  idxEnd: number | undefined,
34
34
  ): boolean | string {
35
35
  if (Array.isArray(value)) {
36
+ console.log("S", value);
36
37
  if (index !== undefined && idxEnd === undefined) {
37
38
  if (index > -1 && index < value.length) {
38
39
  const result = condition.check(value[index]);
@@ -45,16 +46,14 @@ export class AE extends DBC {
45
46
  return true; // In order for optional parameter to not cause an error if they are omitted.
46
47
  }
47
48
 
48
- for (
49
- let i = index ? index : 0;
50
- i <
51
- (idxEnd !== undefined
49
+ const ending =
50
+ idxEnd !== undefined
52
51
  ? idxEnd !== -1
53
52
  ? idxEnd + 1
54
53
  : (value as []).length
55
- : (value as []).length);
56
- i++
57
- ) {
54
+ : (value as []).length;
55
+
56
+ for (let i = index ? index : 0; i < ending; i++) {
58
57
  const result = condition.check(value[i]);
59
58
 
60
59
  if (result !== true) {