Skip to content

Commit 676a868

Browse files
chore(internal): remove unused method (#13)
1 parent cec805c commit 676a868

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/client.ts

-18
Original file line numberDiff line numberDiff line change
@@ -237,24 +237,6 @@ export class Lightswitch {
237237
return url.toString();
238238
}
239239

240-
private calculateContentLength(body: unknown): string | null {
241-
if (typeof body === 'string') {
242-
if (typeof (globalThis as any).Buffer !== 'undefined') {
243-
return (globalThis as any).Buffer.byteLength(body, 'utf8').toString();
244-
}
245-
246-
if (typeof (globalThis as any).TextEncoder !== 'undefined') {
247-
const encoder = new (globalThis as any).TextEncoder();
248-
const encoded = encoder.encode(body);
249-
return encoded.length.toString();
250-
}
251-
} else if (ArrayBuffer.isView(body)) {
252-
return body.byteLength.toString();
253-
}
254-
255-
return null;
256-
}
257-
258240
/**
259241
* Used as a callback for mutating the given `FinalRequestOptions` object.
260242
*/

0 commit comments

Comments
 (0)