/** * Copyright (c) 2019, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: MIT * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT */ import type { QueryObject, CompiledQuery } from './types.js'; /** * f("one two &") -> "one%20two%20%26" * * @param str - String to URI encode * * @returns {string} */ export declare function encode(str?: string): string; /** * f("one%20two%20%26") -> "one two &" * * @param str - String to URI decode * * @returns {string} */ export declare function decode(str?: string): string; /** * f(url) -> "/some/relative/path" * Output will... * - always start with '/' * - not contain query params or fragment * - akin to window.location.pathname * * @param {string} url - URL string to parse for a path * * @returns {string} */ export declare function getPathFromUrl(url: string): string; /** * f(url) -> { "param1": "one", "param2": "two", param3: "" } * Parameters without values get set to an empty string. * * @param {string} url - URL string to parse for a query object * * @returns {object} */ export declare function getQueryFromUrl(url: string): QueryObject; /** * f({ "param1": "one", "param2": "two", param3: "" }) -> "?param1=one¶m2=two¶m3" * Query parameter values, but not keys, get URI encoded. * * @param {object} queryObject - Query object to turn into a string * * @returns {string} */ export declare function getQueryString(queryObj?: QueryObject): string; /** * Determines if the given string is a paramter name (":paramName") * @param str string to test * @returns true if string starts with ":" */ export declare function isParam(str: string | null | undefined): boolean; /** * @param routeParamName - routeParamName from CompiledQueryResult * @returns the paramName without prefix; or undefined */ export declare function getParamName(routeParamName: string | undefined | null): string | false; export declare function getQueryNames(compiledQuery: CompiledQuery): string[]; //# sourceMappingURL=uriUtils.d.ts.map