@xapp/arachne-utils
Version:
22 lines • 840 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeURL = normalizeURL;
/*! Copyright (c) 2020, XAPP AI */
const normalize_url_1 = __importDefault(require("normalize-url"));
/**
* Normalize the URL to make it easier to dedupe or compare URLs.
*
* It is a wrapper around the package {@link https://github.com/sindresorhus/normalize-url} but
* with setting a default option of stripHash to true, which can be overridden if you provide
* your own options.
*
* @param url
* @param removeAnchor
*/
function normalizeURL(url, options = { stripHash: true }) {
return (0, normalize_url_1.default)(url, options);
}
//# sourceMappingURL=normalizeURL.js.map