web_lib

Common web application libraries
git clone https://radroots.dev/git/web_lib.git
Log | Files | Refs | LICENSE

index.ts (236B)


      1 export function as_array_buffer(u8: Uint8Array): ArrayBuffer {
      2     if (u8.byteOffset === 0 && u8.buffer instanceof ArrayBuffer && u8.byteLength === u8.buffer.byteLength) {
      3         return u8.buffer;
      4     }
      5     return u8.slice().buffer;
      6 }