Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_.forEach(params, function (value, key) {
result += result.length ? '&' : '?';
result += encode(String(key), encode.componentChars);
result += '=';
// Don't dump protected params
if (PROTECTED_PARAMS.indexOf(key) !== -1) result += '****';
// Do not dump nested objects.
else if (_.isObject(value)) result += '{...}';
else result += encode(String(value), encode.componentChars);
if (result.length > MAX_PARAMS_LOG_LENGTH) {
result = result.slice(0, MAX_PARAMS_LOG_LENGTH);
return false; // terminate
}
});
export function encodeRsqlValue(value: string): string {
return encode(value, encode.componentChars + '=:,;"\'<>#', false)
}
export function encodeRsqlValue(str) {
return encode(str, encode.componentChars + "=:,;\"'<>", false)
}
export function encodeRsqlValue (str) {
return encode(str, encode.componentChars + "=:,;\"'<>#", false)
}