@trapi/swagger
Version:
Generate Swagger files from a decorator APIs.
20 lines • 677 B
JavaScript
;
/*
* Copyright (c) 2021-2022.
* Author Peter Placzek (tada5hi)
* For the full copyright and license information,
* view the LICENSE file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.removeDuplicateSlashes = removeDuplicateSlashes;
exports.removeFinalCharacter = removeFinalCharacter;
function removeDuplicateSlashes(str) {
return str.replace('/([^:]$)/+/g', '$1');
}
function removeFinalCharacter(str, character) {
while (str.charAt(str.length - 1) === character && str.length > 0) {
str = str.slice(0, -1);
}
return str;
}
//# sourceMappingURL=character.js.map