@grace-js/grace
Version:
An opinionated API framework
14 lines • 445 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getQuery = exports.getPath = void 0;
const getPath = (url) => {
const match = url.match(/^https?:\/\/[^/]+(\/[^?]*)/);
return match ? match[1] : '';
};
exports.getPath = getPath;
const getQuery = (url) => {
const match = url.match(/^[^?]+\?([^#]*)/);
return match ? match[1] : '';
};
exports.getQuery = getQuery;
//# sourceMappingURL=url.js.map