transferToFixedLength

Creates a new non-resizable ArrayBuffer with the same byte content as this buffer, then detaches this buffer.

MDN