{"size": 403, "ext": "js", "max_stars_repo_path": "build/shared/utils/parseDocumentSlug.js", "max_stars_repo_name": "benlaxtellll/knowbasedevtest", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "build/shared/utils/parseDocumentSlug.js", "max_issues_repo_name": "benlaxtellll/knowbasedevtest", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "build/shared/utils/parseDocumentSlug.js", "max_forks_repo_name": "benlaxtellll/knowbasedevtest", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 16.7916666667, "max_line_length": 46, "alphanum_fraction": 0.5955334988}
"use strict";

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

require("core-js/modules/es6.regexp.replace");

function parseDocumentSlug(url) {
  var parsed;

  if (url[0] === "/") {
    parsed = url;
  } else {
    try {
      parsed = new URL(url).pathname;
    } catch (err) {
      return;
    }
  }

  return parsed.replace(/^\/doc\//, "");
}