@azure/cosmos
Version:
Microsoft Azure Cosmos DB Service Node.js SDK for NOSQL API
20 lines • 576 B
JavaScript
;
// 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