"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = getIdByPathname;

var _path = _interopRequireDefault(require("path"));

var _urlQuery = _interopRequireDefault(require("./url-query"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function getIdByPathname(pathname, base = "/") {
  const parsed = _urlQuery.default.parse(pathname);

  return _path.default.relative(base, parsed.pathname);
}
//# sourceMappingURL=get-id-by-pathname.js.map