@abaplint/runtime 2.7.164 → 2.7.165

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.
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.abs = void 0;
4
+ /* eslint-disable radix */
5
+ const types_1 = require("../types");
4
6
  function abs(input) {
5
7
  let num_in = undefined;
6
8
  if (typeof input.val === "number") {
@@ -9,6 +11,9 @@ function abs(input) {
9
11
  else if (typeof input.val === "string") {
10
12
  num_in = parseFloat(input.val);
11
13
  }
14
+ else if (input.val instanceof types_1.Float) {
15
+ num_in = input.val.getRaw();
16
+ }
12
17
  else {
13
18
  num_in = parseFloat(input.val.get().toString());
14
19
  }
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.trunc = void 0;
4
+ /* eslint-disable radix */
5
+ const types_1 = require("../types");
4
6
  function trunc(input) {
5
7
  let num_in = undefined;
6
8
  if (typeof input.val === "number") {
@@ -9,6 +11,9 @@ function trunc(input) {
9
11
  else if (typeof input.val === "string") {
10
12
  num_in = parseFloat(input.val);
11
13
  }
14
+ else if (input.val instanceof types_1.Float) {
15
+ num_in = input.val.getRaw();
16
+ }
12
17
  else {
13
18
  num_in = parseFloat(input.val.get().toString());
14
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.7.164",
3
+ "version": "2.7.165",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",
@@ -37,6 +37,6 @@
37
37
  "typescript": "^5.3.3"
38
38
  },
39
39
  "dependencies": {
40
- "temporal-polyfill": "^0.2.2"
40
+ "temporal-polyfill": "^0.2.3"
41
41
  }
42
42
  }