{"size": 1238, "ext": "js", "max_stars_repo_path": "lib/sitemap/index.js", "max_stars_repo_name": "adrienv1520/node-uri", "max_stars_repo_stars_event_min_datetime": "2020-09-23T09:30:20.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-18T06:59:32.000Z", "max_issues_repo_path": "lib/sitemap/index.js", "max_issues_repo_name": "adrienv1520/node-uri", "max_issues_repo_issues_event_min_datetime": "2021-02-23T12:44:49.000Z", "max_issues_repo_issues_event_max_datetime": "2021-10-06T13:57:58.000Z", "max_forks_repo_path": "lib/sitemap/index.js", "max_forks_repo_name": "adrienv1520/node-uri", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 9, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 19.6507936508, "max_line_length": 51, "alphanum_fraction": 0.7059773829}
/**
 * sitemap
 *
 * Percent encodings, entities and escape codes.
 *
 * - specialChars
 * - specialCharsKeys
 * - pencodings
 * - pencodingsKeys
 * - entities
 * - entitiesKeys
 * - escapeCodes
 * - escapeCodesKeys
 * - escapeCodesKeysLen
 */

// special chars and their percent encodings
const specialChars = {
  '*': '%2A',
};

// special chars keys
const specialCharsKeys = Object.keys(specialChars);

// inversed special chars (percent encodings)
const pencodings = {};
specialCharsKeys.forEach((char) => {
  pencodings[specialChars[char]] = char;
});

const pencodingsKeys = Object.keys(pencodings);

// sitemap entities to be escaped in URLs
const entities = {
  '&': '&amp;',
  '\'': '&apos;',
};

// entities keys
const entitiesKeys = Object.keys(entities);

// inversed entities keys (escape codes)
const escapeCodes = {};
entitiesKeys.forEach((entity) => {
  escapeCodes[entities[entity]] = entity;
});

// escape codes keys and length
const escapeCodesKeys = Object.keys(escapeCodes);
const escapeCodesKeysLen = escapeCodesKeys.length;

module.exports = Object.freeze({
  specialChars,
  specialCharsKeys,
  pencodings,
  pencodingsKeys,
  entities,
  entitiesKeys,
  escapeCodes,
  escapeCodesKeys,
  escapeCodesKeysLen,
});
