diff --git a/src/helpers/escape.ts b/src/helpers/escape.ts index a162d94a8..fabe32904 100644 --- a/src/helpers/escape.ts +++ b/src/helpers/escape.ts @@ -38,23 +38,21 @@ export function escapeString(rawValue: any, options: EscapeOptions = {}) { return [...stringValue] .map(c => { if (c === '\b') { - return `${escapeChar }b`; + return `${escapeChar}b`; } else if (c === '\t') { - return `${escapeChar }t`; + return `${escapeChar}t`; } else if (c === '\n') { if (escapeNewlines) { - return `${escapeChar }n`; - } - return c; // Don't just continue, or this is caught by < \u0020 - + return `${escapeChar}n`; + } + return c; // Don't just continue, or this is caught by < \u0020 } else if (c === '\f') { - return `${escapeChar }f`; + return `${escapeChar}f`; } else if (c === '\r') { if (escapeNewlines) { - return `${escapeChar }r`; - } - return c; // Don't just continue, or this is caught by < \u0020 - + return `${escapeChar}r`; + } + return c; // Don't just continue, or this is caught by < \u0020 } else if (c === escapeChar) { return escapeChar + escapeChar; } else if (c === delimiter) { @@ -65,9 +63,8 @@ export function escapeString(rawValue: any, options: EscapeOptions = {}) { // using this primarily for header values that are generally (though not 100% // strictly?) ASCII-only, this should almost never happen. return JSON.stringify(c).slice(1, -1); - } - return c; - + } + return c; }) .join(''); } diff --git a/src/helpers/headers.ts b/src/helpers/headers.ts index b8353863a..dfae16c72 100644 --- a/src/helpers/headers.ts +++ b/src/helpers/headers.ts @@ -1,5 +1,3 @@ -import { ValueOf } from 'type-fest'; - type Headers = Record; /** diff --git a/src/targets/r/httr/client.ts b/src/targets/r/httr/client.ts index 1a891f380..c8c2f2061 100644 --- a/src/targets/r/httr/client.ts +++ b/src/targets/r/httr/client.ts @@ -135,7 +135,7 @@ export const httr: Client = { .join(', '); if (headerAdditions) { - request += `, ${ headerAdditions}`; + request += `, ${headerAdditions}`; } if (postData.text || postData.jsonObj || postData.params) {