@protocol-launcher/shared 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){return e===void 0}function t(e,t){return t?encodeURIComponent(e):e}function n(e,n){return btoa(t(e,n).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16))))}function r(e,r={}){let{useSafeEncoding:i=!1,encodeForUrl:a=!0}=r,o=typeof e==`string`?e:JSON.stringify(e),s;if(i)s=n(o,a);else try{s=btoa(o)}catch{s=n(o,a)}return t(s,a)}export{r as encodeUrlPayload,e as isUndefined};
|
|
1
|
+
function e(e){return e===void 0}function t(e,t){return t?encodeURIComponent(e):e}function n(e,n){return btoa(t(e,n).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16))))}function r(e,r={}){let{useSafeEncoding:i=!1,encodeForUrl:a=!0}=r,o=typeof e==`string`?e:JSON.stringify(e),s;if(i)s=n(o,a);else try{s=btoa(o)}catch{s=n(o,a)}return t(s,a)}function i(e){return Object.entries(e).flatMap(([e,t])=>t==null?[]:Array.isArray(t)?t.map(t=>`${e}=${encodeURIComponent(String(t))}`):`${e}=${encodeURIComponent(String(t))}`).join(`&`)}export{r as encodeUrlPayload,e as isUndefined,i as qs};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export interface EncodeOptions {
|
|
|
4
4
|
}
|
|
5
5
|
export declare function isUndefined(value: unknown): value is undefined;
|
|
6
6
|
export declare function encodeUrlPayload(payload: unknown, options?: EncodeOptions): string;
|
|
7
|
+
export declare function qs(params: Record<string, unknown>): string;
|