morbo-cli
Version:
… All tech debt is vermin in the eyes of Morbo!
19 lines (18 loc) • 537 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Removes the end of html, twig and handlebar comments. EG: -->, --}}, etc.
*
* @param {String} str
*
* @return {String}
*/
function removeCommentEnd(str) {
var replaceString = str;
var commentEnds = ['-->', '#}}', '*/', '--}}', '}}', '*/}', '}'];
for (var i = 0; i < commentEnds.length; i += 1) {
replaceString = replaceString.replace(commentEnds[i], '');
}
return replaceString;
}
exports.default = removeCommentEnd;