source: frontend/node_modules/underscore/modules/_toBufferView.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 365 bytes
Line 
1import getByteLength from './_getByteLength.js';
2
3// Internal function to wrap or shallow-copy an ArrayBuffer,
4// typed array or DataView to a new view, reusing the buffer.
5export default function toBufferView(bufferSource) {
6 return new Uint8Array(
7 bufferSource.buffer || bufferSource,
8 bufferSource.byteOffset || 0,
9 getByteLength(bufferSource)
10 );
11}
Note: See TracBrowser for help on using the repository browser.