@trapi/metadata
Version:
Generate REST-API metadata scheme from TypeScript Decorators.
17 lines • 540 B
JavaScript
;
/*
* Copyright (c) 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.normalizePath = void 0;
function normalizePath(str) {
// remove slashes
str = str.replace(/^[/\\\s]+|[/\\\s]+$/g, '');
str = str.replace(/([^:]\/)\/+/g, '$1');
return str;
}
exports.normalizePath = normalizePath;
//# sourceMappingURL=path-normalize.js.map