{"size": 814, "ext": "js", "max_stars_repo_path": "dist/utils/normalizers.js", "max_stars_repo_name": "roderik/nestjs-prom", "max_stars_repo_stars_event_min_datetime": "2021-08-24T12:39:26.000Z", "max_stars_repo_stars_event_max_datetime": "2021-08-24T12:39:26.000Z", "max_issues_repo_path": "dist/utils/normalizers.js", "max_issues_repo_name": "roderik/nestjs-prom", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "dist/utils/normalizers.js", "max_forks_repo_name": "roderik/nestjs-prom", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 37.0, "max_line_length": 62, "alphanum_fraction": 0.7076167076}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeStatusCode = exports.normalizePath = void 0;
const url = require("url");
const UrlValueParser = require("url-value-parser");
function normalizePath(originalUrl, extraMasks, placeholder) {
    const { pathname } = url.parse(originalUrl);
    const urlParser = new UrlValueParser({ extraMasks });
    return urlParser.replacePathValues(pathname, placeholder);
}
exports.normalizePath = normalizePath;
function normalizeStatusCode(statusCode) {
    if (statusCode >= 200 && statusCode < 300)
        return "2XX";
    if (statusCode >= 300 && statusCode < 400)
        return "3XX";
    if (statusCode >= 400 && statusCode < 500)
        return "4XX";
    return "5XX";
}
exports.normalizeStatusCode = normalizeStatusCode;
