@abaplint/runtime
Version:
Transpiler - Runtime
22 lines • 721 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.boolc = boolc;
const types_1 = require("../types");
function boolc(input) {
if (input === true) {
return new types_1.String().set("X");
}
else if (input === false || input === undefined) {
return new types_1.String().set(" ");
}
else if (input.val instanceof types_1.String && input.val.get().trim() === "") {
return new types_1.String().set(" ");
}
else if (input.val instanceof types_1.Character && input.val.get().trim() === "") {
return new types_1.String().set(" ");
}
else {
return new types_1.String().set("X");
}
}
//# sourceMappingURL=boolc.js.map