From 7780ca8b8d50367f7541788dc6960384c9a7f26a Mon Sep 17 00:00:00 2001 From: dojyorin Date: Fri, 26 Jan 2024 14:30:41 +0900 Subject: [PATCH] change name. --- src/pure/byte.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pure/byte.ts b/src/pure/byte.ts index 9bbe33e..a35c47e 100644 --- a/src/pure/byte.ts +++ b/src/pure/byte.ts @@ -37,13 +37,13 @@ export async function blobConvert(blob:Blob, type:T):P * const byte = byteConcat(new Uint8Array([1, 2, 3]), new Uint8Array([4, 5, 6])); * ``` */ -export function byteConcat(...parts:BufferSource[]):Uint8Array{ - const output = new Uint8Array(parts.reduce((n, {byteLength}) => n + byteLength , 0)); +export function byteConcat(...sources:BufferSource[]):Uint8Array{ + const output = new Uint8Array(sources.reduce((n, {byteLength}) => n + byteLength , 0)); let i = 0; - for(const part of parts){ - output.set(new Uint8Array("buffer" in part ? part.buffer : part), i); - i += part.byteLength; + for(const source of sources){ + output.set(new Uint8Array("buffer" in source ? source.buffer : source), i); + i += source.byteLength; } return output;