@typed/routing
Version:
Data structures for path-based logic
10 lines • 494 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.stripRouteFromPath = void 0;
const history_1 = require("@typed/history");
const lambda_1 = require("@typed/lambda");
const basePathFromRoute_1 = require("./basePathFromRoute");
exports.stripRouteFromPath = lambda_1.curry(function stripRoute(route, path) {
return history_1.pathJoin([path.replace(basePathFromRoute_1.basePathFromRoute(path, route), '')]);
});
//# sourceMappingURL=stripRouteFromPath.js.map