UNPKG

@bavenir/spade-node-js-client

Version:

A client-side JavaScript library that can be used to iteract with Data Broker's API.

21 lines (20 loc) 730 B
/** * Copyright (C) 2024 bAvenir * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 */ /** * Removes the protocol (e.g., http://, https://), query parameters, and any trailing slash from a given URL. * * @param {string} url - The URL to be processed. * @returns {string} - The URL without the protocol, query parameters, and trailing slash. * * @example * const url = 'https://example.com/page/?param=value'; * console.log(removeProtocolAndQuery(url)); // Outputs: 'example.com/page' */ export declare function sanitazeUrl(url: string): string;