Files
med-notes/.pnpm-store/v10/files/33/51d583d4022640857550f14f18ee79d63ea60bc45003f5a2e6e3393adeea30e55490f62d20ad5e7ab0412c7f3192ff608bba6e7463343e335ce51ea24050c2
2025-05-09 05:30:08 +02:00

28 lines
1010 B
Plaintext

/**
* Program uses a modified version of the `qss` package:
* Copyright (c) Luke Edwards luke.edwards05@gmail.com, MIT License
* https://github.com/lukeed/qss/blob/master/license.md
*/
/**
* Encodes an object into a query string.
* @param obj - The object to encode into a query string.
* @param [pfx] - An optional prefix to add before the query string.
* @returns The encoded query string.
* @example
* ```
* // Example input: encode({ token: 'foo', key: 'value' })
* // Expected output: "token=foo&key=value"
* ```
*/
export declare function encode(obj: any, pfx?: string): string;
/**
* Decodes a query string into an object.
* @param str - The query string to decode.
* @param [pfx] - An optional prefix to filter out from the query string.
* @returns The decoded key-value pairs in an object format.
* @example
* // Example input: decode("token=foo&key=value")
* // Expected output: { "token": "foo", "key": "value" }
*/
export declare function decode(str: any, pfx?: string): any;