@cabloy/utils 1.0.7 → 1.0.8
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/utils.d.ts +1 -1
- package/dist/utils.js +2 -2
- package/package.json +1 -1
package/dist/utils.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export declare function getPropertyObject<T>(obj: object, name: string, sep?: st
|
|
|
8
8
|
export declare function createFunction(expression: string, scopeKeys?: string[]): Function;
|
|
9
9
|
export declare function evaluateSimple(expression: string): any;
|
|
10
10
|
export declare function getRandomInt(size: number, start?: number): number;
|
|
11
|
-
export declare function combineQueries(url?: string, queries?: Record<string, any>): string
|
|
11
|
+
export declare function combineQueries(url?: string, queries?: Record<string, any>): string;
|
package/dist/utils.js
CHANGED
|
@@ -93,14 +93,14 @@ export function getRandomInt(size, start = 0) {
|
|
|
93
93
|
export function combineQueries(url, queries) {
|
|
94
94
|
//
|
|
95
95
|
if (!queries)
|
|
96
|
-
return url;
|
|
96
|
+
return url || '';
|
|
97
97
|
//
|
|
98
98
|
const parts = [];
|
|
99
99
|
for (const key of Object.keys(queries)) {
|
|
100
100
|
parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(queries[key])}`);
|
|
101
101
|
}
|
|
102
102
|
if (parts.length === 0)
|
|
103
|
-
return url;
|
|
103
|
+
return url || '';
|
|
104
104
|
//
|
|
105
105
|
const str = parts.join('&');
|
|
106
106
|
//
|