@constela/server 17.0.0 → 17.0.1

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 (2) hide show
  1. package/dist/index.js +12 -0
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -612,6 +612,12 @@ function evaluateBinary(op, left, right, ctx) {
612
612
  }
613
613
  return dividend / divisor;
614
614
  }
615
+ case "%": {
616
+ const dividend = typeof leftVal === "number" ? leftVal : 0;
617
+ const divisor = typeof rightVal === "number" ? rightVal : 0;
618
+ if (divisor === 0) return NaN;
619
+ return dividend % divisor;
620
+ }
615
621
  case "==":
616
622
  return leftVal === rightVal;
617
623
  case "!=":
@@ -1383,6 +1389,12 @@ function evaluateBinary2(op, left, right, ctx) {
1383
1389
  }
1384
1390
  return dividend / divisor;
1385
1391
  }
1392
+ case "%": {
1393
+ const dividend = typeof leftVal === "number" ? leftVal : 0;
1394
+ const divisor = typeof rightVal === "number" ? rightVal : 0;
1395
+ if (divisor === 0) return NaN;
1396
+ return dividend % divisor;
1397
+ }
1386
1398
  case "==":
1387
1399
  return leftVal === rightVal;
1388
1400
  case "!=":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constela/server",
3
- "version": "17.0.0",
3
+ "version": "17.0.1",
4
4
  "description": "Server-side rendering for Constela UI framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -29,8 +29,8 @@
29
29
  "tsup": "^8.0.0",
30
30
  "typescript": "^5.3.0",
31
31
  "vitest": "^2.0.0",
32
- "@constela/core": "0.21.0",
33
- "@constela/compiler": "0.15.16"
32
+ "@constela/compiler": "0.15.16",
33
+ "@constela/core": "0.21.0"
34
34
  },
35
35
  "engines": {
36
36
  "node": ">=20.0.0"