Skip to content

Commit

Permalink
chore: lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nivedin committed Jul 10, 2024
1 parent e44a4de commit 79069c0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
25 changes: 11 additions & 14 deletions src/helpers/escape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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('');
}
Expand Down
2 changes: 0 additions & 2 deletions src/helpers/headers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { ValueOf } from 'type-fest';

type Headers<T> = Record<string, T>;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/targets/r/httr/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const httr: Client = {
.join(', ');

if (headerAdditions) {
request += `, ${ headerAdditions}`;
request += `, ${headerAdditions}`;
}

if (postData.text || postData.jsonObj || postData.params) {
Expand Down

0 comments on commit 79069c0

Please sign in to comment.