uspring
Version:
A very fast Webserver which has interface like springboot
13 lines (12 loc) • 369 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function constructObjectFromRefUrl(refUrl) {
var obj = {};
refUrl.split('/').forEach(function (pathname, index) {
if (pathname.startsWith(':')) {
obj[pathname.substr(1)] = index - 1;
}
});
return obj;
}
exports.default = constructObjectFromRefUrl;