src/helpers/escape.ts
Function escapeString
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function escapeString(rawValue: any, options: EscapeOptions = {}) {
const {
delimiter = '"',
escapeChar = '\\',
escapeNewlines = true
Avoid too many return
statements within this function. Open
Open
return escapeChar + 'f';
Avoid too many return
statements within this function. Open
Open
return escapeChar + 'r';
Avoid too many return
statements within this function. Open
Open
return c; // Don't just continue, or this is caught by < \u0020
Avoid too many return
statements within this function. Open
Open
return JSON.stringify(c).slice(1, -1);
Avoid too many return
statements within this function. Open
Open
return escapeChar + escapeChar;
Avoid too many return
statements within this function. Open
Open
return c;
Avoid too many return
statements within this function. Open
Open
return escapeChar + delimiter;