fume-fhir-converter
Version:
FHIR-Utilized Mapping Engine - Community
21 lines • 660 B
JavaScript
;
/**
* © Copyright Outburn Ltd. 2022-2024 All Rights Reserved
* Project name: FUME-COMMUNITY
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.replaceColonsWithBrackets = void 0;
const replaceColonsWithBrackets = (path) => {
const nodes = path.split('.');
const final = nodes.map((n, i) => {
if ((i === nodes.length - 1) && n.includes(':')) {
return n.replace(':', '[') + ']';
}
else {
return n;
}
});
return final.join('.');
};
exports.replaceColonsWithBrackets = replaceColonsWithBrackets;
//# sourceMappingURL=replaceColonsWithBrackets.js.map