@firestitch/filter 18.2.107 → 18.2.108
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.
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Escapes commas and colons in a query-param value so they are not
|
|
3
|
+
* misinterpreted as delimiters during deserialization.
|
|
4
|
+
*
|
|
5
|
+
* Accepts nullish input defensively — AutocompleteItem.value can
|
|
6
|
+
* resolve to a bare primitive whose `.name` is undefined.
|
|
7
|
+
*/
|
|
8
|
+
export declare function encodeQueryParam(value: string | null | undefined): string;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Escapes commas and colons in a query-param value so they are not
|
|
3
|
+
* misinterpreted as delimiters during deserialization.
|
|
4
|
+
*
|
|
5
|
+
* Accepts nullish input defensively — AutocompleteItem.value can
|
|
6
|
+
* resolve to a bare primitive whose `.name` is undefined.
|
|
7
|
+
*/
|
|
1
8
|
export function encodeQueryParam(value) {
|
|
2
|
-
return value
|
|
9
|
+
return (value ?? '')
|
|
3
10
|
.replace(/,/g, '\\,')
|
|
4
11
|
.replace(/:/g, '\\:');
|
|
5
12
|
}
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW5jb2RlLXF1ZXJ5LXBhcm0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYXBwL2hlbHBlcnMvZW5jb2RlLXF1ZXJ5LXBhcm0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBQ0gsTUFBTSxVQUFVLGdCQUFnQixDQUFDLEtBQWdDO0lBQy9ELE9BQU8sQ0FBQyxLQUFLLElBQUksRUFBRSxDQUFDO1NBQ2pCLE9BQU8sQ0FBQyxJQUFJLEVBQUUsS0FBSyxDQUFDO1NBQ3BCLE9BQU8sQ0FBQyxJQUFJLEVBQUUsS0FBSyxDQUFDLENBQUM7QUFDMUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXNjYXBlcyBjb21tYXMgYW5kIGNvbG9ucyBpbiBhIHF1ZXJ5LXBhcmFtIHZhbHVlIHNvIHRoZXkgYXJlIG5vdFxuICogbWlzaW50ZXJwcmV0ZWQgYXMgZGVsaW1pdGVycyBkdXJpbmcgZGVzZXJpYWxpemF0aW9uLlxuICpcbiAqIEFjY2VwdHMgbnVsbGlzaCBpbnB1dCBkZWZlbnNpdmVseSDigJQgQXV0b2NvbXBsZXRlSXRlbS52YWx1ZSBjYW5cbiAqIHJlc29sdmUgdG8gYSBiYXJlIHByaW1pdGl2ZSB3aG9zZSBgLm5hbWVgIGlzIHVuZGVmaW5lZC5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGVuY29kZVF1ZXJ5UGFyYW0odmFsdWU6IHN0cmluZyB8IG51bGwgfCB1bmRlZmluZWQpOiBzdHJpbmcge1xuICByZXR1cm4gKHZhbHVlID8/ICcnKVxuICAgIC5yZXBsYWNlKC8sL2csICdcXFxcLCcpXG4gICAgLnJlcGxhY2UoLzovZywgJ1xcXFw6Jyk7XG59XG4iXX0=
|
|
@@ -905,8 +905,15 @@ function arraysAreEquals(arr1, arr2) {
|
|
|
905
905
|
return true;
|
|
906
906
|
}
|
|
907
907
|
|
|
908
|
+
/**
|
|
909
|
+
* Escapes commas and colons in a query-param value so they are not
|
|
910
|
+
* misinterpreted as delimiters during deserialization.
|
|
911
|
+
*
|
|
912
|
+
* Accepts nullish input defensively — AutocompleteItem.value can
|
|
913
|
+
* resolve to a bare primitive whose `.name` is undefined.
|
|
914
|
+
*/
|
|
908
915
|
function encodeQueryParam(value) {
|
|
909
|
-
return value
|
|
916
|
+
return (value ?? '')
|
|
910
917
|
.replace(/,/g, '\\,')
|
|
911
918
|
.replace(/:/g, '\\:');
|
|
912
919
|
}
|