UNPKG

@azure/cosmos

Version:
20 lines 576 B
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); exports.checkURL = checkURL; exports.sanitizeEndpoint = sanitizeEndpoint; exports.normalizeEndpoint = normalizeEndpoint; function checkURL(testString) { return new URL(testString); } function sanitizeEndpoint(url) { return new URL(url).href.replace(/\/$/, ""); } /** * @internal */ function normalizeEndpoint(endpoint) { return endpoint.replace(/\s+/g, "").toLowerCase(); } //# sourceMappingURL=checkURL.js.map