mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-02 21:33:52 +02:00
Add toDataView
This commit is contained in:
@@ -54,6 +54,10 @@ export const toUint8Array = (source: AllowSharedBufferSource): Uint8Array => {
|
||||
}
|
||||
};
|
||||
|
||||
export const toDataView = (bytes: Uint8Array) => {
|
||||
return new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
||||
};
|
||||
|
||||
export const textEncoder = new TextEncoder();
|
||||
|
||||
const invertObject = <K extends PropertyKey, V extends PropertyKey>(object: Record<K, V>) => {
|
||||
|
||||
Reference in New Issue
Block a user