feat: eslint 적용 및 관련 코드 일괄 수정

This commit is contained in:
2026-01-05 15:46:47 +00:00
parent cb312f02b3
commit c965b1120f
387 changed files with 39808 additions and 38800 deletions
@@ -5,11 +5,7 @@ export function convertBytesLikeToArrayBuffer(data: BytesLike, encodeUTF8 = true
return data;
}
if (data instanceof Uint8Array) {
if (
data.byteOffset === 0
&& data.byteLength === data.buffer.byteLength
&& data.buffer instanceof ArrayBuffer
) {
if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength && data.buffer instanceof ArrayBuffer) {
return data.buffer;
}
return data.slice().buffer;
@@ -18,9 +14,9 @@ export function convertBytesLikeToArrayBuffer(data: BytesLike, encodeUTF8 = true
const view = new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
return view.slice().buffer;
}
if (typeof (data) === 'string') {
if (typeof data === 'string') {
if (encodeUTF8) {
return (new TextEncoder()).encode(data).buffer;
return new TextEncoder().encode(data).buffer;
}
return new Uint8Array(data.split('').map((s) => s.codePointAt(0) as number)).buffer;
}