@abaplint/runtime 2.0.47 → 2.0.50
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/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# @abaplint/runtime
|
|
2
|
-
|
|
1
|
+
# @abaplint/runtime
|
|
2
|
+
|
|
3
3
|
Runtime
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Structure } from "../types";
|
|
1
2
|
import { ICharacter } from "../types/_character";
|
|
2
3
|
import { INumeric } from "../types/_numeric";
|
|
3
|
-
export declare function co(left: number | string | ICharacter | INumeric, right: string | ICharacter): boolean;
|
|
4
|
+
export declare function co(left: number | string | ICharacter | INumeric, right: string | Structure | ICharacter): boolean;
|
package/build/src/compare/co.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.co = void 0;
|
|
4
|
+
const types_1 = require("../types");
|
|
4
5
|
function co(left, right) {
|
|
5
6
|
let l = "";
|
|
6
7
|
if (typeof left === "number" || typeof left === "string") {
|
|
@@ -13,6 +14,9 @@ function co(left, right) {
|
|
|
13
14
|
if (typeof right === "string") {
|
|
14
15
|
r = right.toString();
|
|
15
16
|
}
|
|
17
|
+
else if (right instanceof types_1.Structure) {
|
|
18
|
+
r = Object.values(right.get()).map((a) => a.get()).join("");
|
|
19
|
+
}
|
|
16
20
|
else {
|
|
17
21
|
r = right.get().toString();
|
|
18
22
|
}
|
|
@@ -10,6 +10,7 @@ function deleteInternal(target, options) {
|
|
|
10
10
|
if ((options === null || options === void 0 ? void 0 : options.index)
|
|
11
11
|
&& (options === null || options === void 0 ? void 0 : options.where) === undefined
|
|
12
12
|
&& (options === null || options === void 0 ? void 0 : options.adjacent) === undefined
|
|
13
|
+
&& (options === null || options === void 0 ? void 0 : options.fromValue) === undefined
|
|
13
14
|
&& (options === null || options === void 0 ? void 0 : options.from) === undefined
|
|
14
15
|
&& (options === null || options === void 0 ? void 0 : options.to) === undefined) {
|
|
15
16
|
target.deleteIndex(options.index.get() - 1);
|
|
@@ -44,9 +45,15 @@ function deleteInternal(target, options) {
|
|
|
44
45
|
else if ((options === null || options === void 0 ? void 0 : options.index) && options.index.get() === index) {
|
|
45
46
|
target.deleteIndex(options.index.get() - 1);
|
|
46
47
|
}
|
|
48
|
+
else if ((options === null || options === void 0 ? void 0 : options.fromValue) && (0, compare_1.eq)(options.fromValue, i)) {
|
|
49
|
+
target.deleteIndex(index);
|
|
50
|
+
}
|
|
47
51
|
else if ((options === null || options === void 0 ? void 0 : options.from) && options.from.get() <= index + 1) {
|
|
48
52
|
target.deleteIndex(index);
|
|
49
53
|
}
|
|
54
|
+
else if ((options === null || options === void 0 ? void 0 : options.to) && options.to.get() <= index + 1) {
|
|
55
|
+
target.deleteIndex(0);
|
|
56
|
+
}
|
|
50
57
|
prev = i;
|
|
51
58
|
}
|
|
52
59
|
}
|
package/package.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@abaplint/runtime",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "Transpiler - Runtime",
|
|
5
|
-
"main": "build/src/index.js",
|
|
6
|
-
"typings": "build/src/index.d.ts",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/abaplint/transpiler.git"
|
|
10
|
-
},
|
|
11
|
-
"scripts": {
|
|
12
|
-
"compile": "tsc",
|
|
13
|
-
"publish:major": "npm --no-git-tag-version version major && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
14
|
-
"publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
15
|
-
"publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
16
|
-
"test": "npm run compile && mocha"
|
|
17
|
-
},
|
|
18
|
-
"mocha": {
|
|
19
|
-
"recursive": true,
|
|
20
|
-
"reporter": "progress",
|
|
21
|
-
"spec": "build/test/**/*.js",
|
|
22
|
-
"require": "source-map-support/register"
|
|
23
|
-
},
|
|
24
|
-
"keywords": [
|
|
25
|
-
"ABAP",
|
|
26
|
-
"abaplint"
|
|
27
|
-
],
|
|
28
|
-
"author": "abaplint",
|
|
29
|
-
"license": "MIT",
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@types/chai": "^4.3.1",
|
|
32
|
-
"@types/mocha": "^9.1.1",
|
|
33
|
-
"chai": "^4.3.6",
|
|
34
|
-
"mocha": "^10.0.0",
|
|
35
|
-
"source-map-support": "^0.5.21",
|
|
36
|
-
"typescript": "^4.7.4"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@abaplint/runtime",
|
|
3
|
+
"version": "2.0.50",
|
|
4
|
+
"description": "Transpiler - Runtime",
|
|
5
|
+
"main": "build/src/index.js",
|
|
6
|
+
"typings": "build/src/index.d.ts",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/abaplint/transpiler.git"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"compile": "tsc",
|
|
13
|
+
"publish:major": "npm --no-git-tag-version version major && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
14
|
+
"publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
15
|
+
"publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
16
|
+
"test": "npm run compile && mocha"
|
|
17
|
+
},
|
|
18
|
+
"mocha": {
|
|
19
|
+
"recursive": true,
|
|
20
|
+
"reporter": "progress",
|
|
21
|
+
"spec": "build/test/**/*.js",
|
|
22
|
+
"require": "source-map-support/register"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"ABAP",
|
|
26
|
+
"abaplint"
|
|
27
|
+
],
|
|
28
|
+
"author": "abaplint",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/chai": "^4.3.1",
|
|
32
|
+
"@types/mocha": "^9.1.1",
|
|
33
|
+
"chai": "^4.3.6",
|
|
34
|
+
"mocha": "^10.0.0",
|
|
35
|
+
"source-map-support": "^0.5.21",
|
|
36
|
+
"typescript": "^4.7.4"
|
|
37
|
+
}
|
|
38
|
+
}
|