mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-03 01:39:21 +02:00
7 lines
219 B
TypeScript
7 lines
219 B
TypeScript
export function toLocalUint8Array(value: Uint8Array): Uint8Array<ArrayBuffer> {
|
|
if (value.buffer instanceof ArrayBuffer) {
|
|
return value as Uint8Array<ArrayBuffer>;
|
|
}
|
|
|
|
return new Uint8Array(value);
|
|
}
|